* tree-vect-loop.c (vectorizable_reduction): Give up early on
*SHIFT_EXPR and *ROTATE_EXPR codes.
* gcc.c-torture/compile/pr55955.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195190
138bc75d-0d04-0410-961f-
82ee72b054a4
2013-01-15 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/55955
+ * tree-vect-loop.c (vectorizable_reduction): Give up early on
+ *SHIFT_EXPR and *ROTATE_EXPR codes.
+
PR tree-optimization/48766
* opts.c (common_handle_option): For -fwrapv disable -ftrapv, for
-ftrapv disable -fwrapv.
+2013-01-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/55955
+ * gcc.c-torture/compile/pr55955.c: New test.
+
2013-01-15 Dodji Seketeli <dodji@redhat.com>
PR c++/55663
--- /dev/null
+/* PR tree-optimization/55955 */
+
+int b;
+
+void
+foo (int x)
+{
+ int a;
+ for (a = x; a < 2; a++)
+ for (b = 0; b < 2; b++)
+ *(unsigned short *) 0x100000UL %= 46;
+}
{
/* 4. Supportable by target? */
+ if (code == LSHIFT_EXPR || code == RSHIFT_EXPR
+ || code == LROTATE_EXPR || code == RROTATE_EXPR)
+ {
+ /* Shifts and rotates are only supported by vectorizable_shifts,
+ not vectorizable_reduction. */
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "unsupported shift or rotation.");
+ return false;
+ }
+
/* 4.1. check support for the operation in the loop */
optab = optab_for_tree_code (code, vectype_in, optab_default);
if (!optab)