re PR middle-end/79454 (c-c++-common/ubsan/overflow-vec-*.c FAILs on some 64-bit...
authorJakub Jelinek <jakub@redhat.com>
Sat, 11 Feb 2017 08:15:30 +0000 (09:15 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 11 Feb 2017 08:15:30 +0000 (09:15 +0100)
PR middle-end/79454
* internal-fn.c (expand_vector_ubsan_overflow): Use piece-wise
result computation whenever lhs doesn't have vector mode, not
just when it has BLKmode.

From-SVN: r245354

gcc/ChangeLog
gcc/internal-fn.c

index 54965929ef6c37f4433407121041c5a18c21c3da..f37f49c1b12b6c4238b7a5526ae4b9d050d9cd04 100644 (file)
@@ -1,3 +1,10 @@
+2017-02-11  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/79454
+       * internal-fn.c (expand_vector_ubsan_overflow): Use piece-wise
+       result computation whenever lhs doesn't have vector mode, not
+       just when it has BLKmode.
+
 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
 
        * doc/makefile.texi (profiledbootstrap): Refer to the
index 1ccc803631af9f0a9fe39142818e678a3ad7e314..1d84b260bf18703ca4a41a300d4899c23c380727 100644 (file)
@@ -1909,7 +1909,7 @@ expand_vector_ubsan_overflow (location_t loc, enum tree_code code, tree lhs,
     {
       optab op;
       lhsr = expand_expr (lhs, NULL_RTX, VOIDmode, EXPAND_WRITE);
-      if (GET_MODE (lhsr) == BLKmode
+      if (!VECTOR_MODE_P (GET_MODE (lhsr))
          || (op = optab_for_tree_code (code, TREE_TYPE (arg0),
                                        optab_default)) == unknown_optab
          || (optab_handler (op, TYPE_MODE (TREE_TYPE (arg0)))