* tree-vrp.c (extract_range_from_binary_expr_1): For LSHIFT_EXPR with
non-singleton shift count range, zero extend low_bound for uns case.
* gcc.dg/torture/pr57083.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198388
138bc75d-0d04-0410-961f-
82ee72b054a4
2013-04-29 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/57083
+ * tree-vrp.c (extract_range_from_binary_expr_1): For LSHIFT_EXPR with
+ non-singleton shift count range, zero extend low_bound for uns case.
+
* config/i386/predicates.md (general_vector_operand): New predicate.
* config/i386/i386.c (const_vector_equal_evenodd_p): New function.
(ix86_expand_mul_widen_evenodd): Force op1 resp. op2 into register
+2013-04-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/57083
+ * gcc.dg/torture/pr57083.c: New test.
+
2013-04-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/56450
--- /dev/null
+/* PR tree-optimization/57083 */
+/* { dg-do run { target int32plus } } */
+
+extern void abort (void);
+short x = 1;
+int y = 0;
+
+int
+main ()
+{
+ unsigned t = (0x7fff8001U - x) << (y == 0);
+ if (t != 0xffff0000U)
+ abort ();
+ return 0;
+}
if (uns)
{
- low_bound = bound;
+ low_bound = bound.zext (prec);
high_bound = complement.zext (prec);
if (tree_to_double_int (vr0.max).ult (low_bound))
{