2017-09-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/82285
* tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
enumeral types.
* gcc.dg/torture/pr82285.c: New testcase.
From-SVN: r253146
+2017-09-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/82285
+ * tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
+ enumeral types.
+
2017-09-25 Tom de Vries <tom@codesourcery.com>
PR target/80035
+2017-09-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/82285
+ * gcc.dg/torture/pr82285.c: New testcase.
+
2017-09-25 Justin Squirek <squirek@adacore.com>
* gnat.dg/entry_family.adb: New testcase
--- /dev/null
+/* { dg-do run } */
+
+enum tst { first = 0, second = 1 };
+
+int
+main ()
+{
+ enum tst data[16];
+
+ for (unsigned i = 0; i < 16; i++)
+ data[i] = (i < 5 ? second : first);
+
+ if (data[2] != second)
+ __builtin_abort ();
+ return 0;
+}
rhs_code = gimple_assign_rhs_code (last_stmt);
if (CONVERT_EXPR_CODE_P (rhs_code))
{
- if (TREE_CODE (TREE_TYPE (lhs)) != INTEGER_TYPE
+ if (! INTEGRAL_TYPE_P (TREE_TYPE (lhs))
|| TYPE_PRECISION (TREE_TYPE (lhs)) == 1)
return NULL;
vectype = get_vectype_for_scalar_type (TREE_TYPE (lhs));