+2013-05-16 Marc Glisse <marc.glisse@inria.fr>
+
+ PR middle-end/57286
+ * fold-const.c (fold_ternary_loc) <VEC_COND_EXPR>: Disable some
+ transformations to avoid an infinite loop.
+
2013-05-16 Marek Polacek <polacek@redhat.com>
* tree-scalar-evolution.c (scev_const_prop): Add more dumps.
fold_convert_loc (loc, type,
TREE_OPERAND (arg0, 0)));
+ /* Disable the transformations below for vectors, since
+ fold_binary_op_with_conditional_arg may undo them immediately,
+ yielding an infinite loop. */
+ if (code == VEC_COND_EXPR)
+ return NULL_TREE;
+
/* Convert A ? B : 0 into A && B if A and B are truth values. */
if (integer_zerop (op2)
&& truth_value_p (TREE_CODE (arg0))
+2013-05-16 Marc Glisse <marc.glisse@inria.fr>
+
+ PR middle-end/57286
+ * gcc.dg/pr57286.c: New testcase.
+ * gcc.dg/vector-shift-2.c: Don't assume int has size 4.
+ * g++.dg/ext/vector22.C: Comment out transformations not
+ performed anymore.
+
2013-05-15 Richard Sandiford <rdsandiford@googlemail.com>
PR target/57260
typedef unsigned vec __attribute__((vector_size(4*sizeof(int))));
+/* Disabled after PR57286
void f(vec*a,vec*b){
*a=(*a)?-1:(*b<10);
*b=(*b)?(*a<10):0;
}
+*/
void g(vec*a,vec*b){
*a=(*a)?(*a<*a):-1;
- *b=(*b)?-1:(*b<*b);
+// *b=(*b)?-1:(*b<*b);
}
void h(vec*a){
*a=(~*a==5);
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+typedef int vec __attribute__ ((vector_size (4*sizeof(int))));
+void f (vec *x){
+ *x = (*x < 0) | 1;
+}
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-ccp1" } */
-typedef unsigned vec __attribute__ ((vector_size (16)));
+typedef unsigned vec __attribute__ ((vector_size (4*sizeof(int))));
void
f (vec *a)
{