Commit 94dc5332 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/57083 (Wrong constant folding)

	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.

	* gcc.dg/torture/pr57083.c: New test.

From-SVN: r198388
parent baee1763
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
......
/* 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;
}
......@@ -2837,7 +2837,7 @@ extract_range_from_binary_expr_1 (value_range_t *vr,
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))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment