diff mbox series

Do not emulate vectors containing floats.

Message ID 20240219092411.15161-1-jchrist@linux.ibm.com
State New
Headers show
Series Do not emulate vectors containing floats. | expand

Commit Message

Juergen Christ Feb. 19, 2024, 9:24 a.m. UTC
Fixes various test failures on s390x.

gcc/ChangeLog:

	* tree-vect-stmts.cc (vectorizable_operation): Don't emulate floating
          point vectors

Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>

Regtested and bootstrapped on x86_64-pc-linux-gnu and
s390x-ibm-linux-gnu.  Okay for trunk?

---
 gcc/tree-vect-stmts.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index 09749ae38174..4164f254fd6e 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -6756,7 +6756,8 @@  vectorizable_operation (vec_info *vinfo,
 	 those through even when the mode isn't word_mode.  For
 	 ops we have to lower the lowering code assumes we are
 	 dealing with word_mode.  */
-      if ((((code == PLUS_EXPR || code == MINUS_EXPR || code == NEGATE_EXPR)
+      if (FLOAT_MODE_P (vec_mode)
+	  || (((code == PLUS_EXPR || code == MINUS_EXPR || code == NEGATE_EXPR)
 	    || !target_support_p)
 	   && maybe_ne (GET_MODE_SIZE (vec_mode), UNITS_PER_WORD))
 	  /* Check only during analysis.  */