re PR tree-optimization/92119 (ICE: SIGSEGV in contains_struct_check (tree.h:3380...
authorRichard Biener <rguenther@suse.de>
Wed, 16 Oct 2019 10:05:21 +0000 (10:05 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 16 Oct 2019 10:05:21 +0000 (10:05 +0000)
2019-10-16  Richard Biener  <rguenther@suse.de>

PR tree-optimization/92119
* tree-vect-patterns.c (vect_recog_rotate_pattern): Guard
against missing bswap lhs.

From-SVN: r277057

gcc/ChangeLog
gcc/tree-vect-patterns.c

index 072eb8ce8bdcabd6bc8a9788ebe32ff6421d2701..37f42cf349fe526992c58e21e1a36efbe0d8991d 100644 (file)
@@ -1,3 +1,9 @@
+2019-10-16  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/92119
+       * tree-vect-patterns.c (vect_recog_rotate_pattern): Guard
+       against missing bswap lhs.
+
 2019-10-16  Richard Sandiford  <richard.sandiford@arm.com>
 
        PR middle-end/92033
index f9c74087893586086817e3dc53d76c91d205acf8..385482ffb98812247af29dac0542ff3354b5ff57 100644 (file)
@@ -2199,7 +2199,8 @@ vect_recog_rotate_pattern (stmt_vec_info stmt_vinfo, tree *type_out)
       lhs = gimple_call_lhs (last_stmt);
       oprnd0 = gimple_call_arg (last_stmt, 0);
       type = TREE_TYPE (oprnd0);
-      if (TYPE_PRECISION (TREE_TYPE (lhs)) != 16
+      if (!lhs
+         || TYPE_PRECISION (TREE_TYPE (lhs)) != 16
          || TYPE_PRECISION (type) <= 16
          || TREE_CODE (oprnd0) != SSA_NAME
          || BITS_PER_UNIT != 8