2015-10-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/68026
* tree-ssa-ccp.c (get_value_for_expr): Zero-extend mask for
unsigned VARYING values.
* gcc.dg/tree-ssa/ssa-ccp-39.c: New testcase.
From-SVN: r229117
+2015-10-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/68026
+ * tree-ssa-ccp.c (get_value_for_expr): Zero-extend mask for
+ unsigned VARYING values.
+
2015-10-21 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
* asan.c (asan_emit_stack_protection): Don't pass local stack to
+2015-10-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/68026
+ * gcc.dg/tree-ssa/ssa-ccp-39.c: New testcase.
+
2015-10-21 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
* c-c++-common/ubsan/float-cast-overflow-10.c: Adjust test.
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O -fdump-tree-ccp1" } */
+
+int main (void)
+{
+ volatile int x1 = 1;
+ volatile int x2 = 1;
+ int x3 = 2;
+ int t = 1;
+
+ t = 3<=(x2|1|x3|x1-1U);
+
+ if (t == 1) {}
+ else { __builtin_abort(); }
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-not "abort" "ccp1" } } */
val.mask = -1;
val.value = NULL_TREE;
}
+
+ if (val.lattice_val == VARYING
+ && TYPE_UNSIGNED (TREE_TYPE (expr)))
+ val.mask = wi::zext (val.mask, TYPE_PRECISION (TREE_TYPE (expr)));
+
return val;
}