public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-9205] Only emulate integral vectors.
@ 2024-02-28 10:17 Juergen Christ
  0 siblings, 0 replies; only message in thread
From: Juergen Christ @ 2024-02-28 10:17 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:82ebfd35da49e5df87da132a7b8c41baeebc57b4

commit r14-9205-g82ebfd35da49e5df87da132a7b8c41baeebc57b4
Author: Juergen Christ <jchrist@linux.ibm.com>
Date:   Mon Feb 19 10:10:35 2024 +0100

    Only emulate integral vectors.
    
    The emulation via word mode tries to perform integer arithmetic on floating
    point values instead of floating point arithmetic.  This leads to
    mis-compilations.
    
    Failure occured on s390x on these existing test cases:
    gcc.dg/vect/tsvc/vect-tsvc-s112.c
    gcc.dg/vect/tsvc/vect-tsvc-s113.c
    gcc.dg/vect/tsvc/vect-tsvc-s119.c
    gcc.dg/vect/tsvc/vect-tsvc-s121.c
    gcc.dg/vect/tsvc/vect-tsvc-s131.c
    gcc.dg/vect/tsvc/vect-tsvc-s132.c
    gcc.dg/vect/tsvc/vect-tsvc-s2233.c
    gcc.dg/vect/tsvc/vect-tsvc-s421.c
    gcc.dg/vect/vect-alias-check-14.c
    gcc.target/s390/vector/partial/s390-vec-length-epil-run-1.c
    gcc.target/s390/vector/partial/s390-vec-length-epil-run-3.c
    gcc.target/s390/vector/partial/s390-vec-length-full-run-3.c
    
    gcc/ChangeLog:
    
            PR tree-optimization/114075
    
            * tree-vect-stmts.cc (vectorizable_operation): Don't emulate floating
            point vectors
    
    Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>

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

diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index 1dbe1115da4..be0e1a9c69d 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 (!INTEGRAL_TYPE_P (TREE_TYPE (vectype))
+	  || (((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.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-28 10:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-28 10:17 [gcc r14-9205] Only emulate integral vectors Juergen Christ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).