mirror of git://gcc.gnu.org/git/gcc.git
re PR tree-optimization/57411 (ICE: verify_ssa failed: definition in block 4 does not dominate use in block 11 with -fno-tree-dce -ftree-vectorize)
PR tree-optimization/57411 * tree-vrp.c (simplify_cond_using_ranges): Verify the constant operand of the condition will bit into the new type when eliminating a cast feeding a condition. PR tree-optimization/57411 * gcc.c-torture/execute/pr57144.c: New test. From-SVN: r198582
This commit is contained in:
parent
47954c4e77
commit
a4ee7cb9bf
|
|
@ -1,3 +1,10 @@
|
|||
2013-05-03 Jeff Law <law@redhat.com>
|
||||
|
||||
PR tree-optimization/57411
|
||||
* tree-vrp.c (simplify_cond_using_ranges): Verify the constant
|
||||
operand of the condition will bit into the new type when eliminating
|
||||
a cast feeding a condition.
|
||||
|
||||
2013-05-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/57130
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
2013-05-02 Jeff Law <law@redhat.com>
|
||||
|
||||
PR tree-optimization/57411
|
||||
* gcc.c-torture/execute/pr57144.c: New test.
|
||||
|
||||
2013-05-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/57130
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
extern void abort (void);
|
||||
extern void exit (int);
|
||||
|
||||
void __attribute__ ((noinline))
|
||||
foo(int a)
|
||||
{
|
||||
int z = a > 0 ? a : -a;
|
||||
long long x = z;
|
||||
if (x > 0x100000000LL)
|
||||
abort ();
|
||||
else
|
||||
exit (0);
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
foo (1);
|
||||
}
|
||||
|
|
@ -8668,7 +8668,8 @@ simplify_cond_using_ranges (gimple stmt)
|
|||
if (range_int_cst_p (vr)
|
||||
&& range_fits_type_p (vr,
|
||||
TYPE_PRECISION (TREE_TYPE (op0)),
|
||||
TYPE_UNSIGNED (TREE_TYPE (op0))))
|
||||
TYPE_UNSIGNED (TREE_TYPE (op0)))
|
||||
&& int_fits_type_p (op1, TREE_TYPE (innerop)))
|
||||
{
|
||||
tree newconst = fold_convert (TREE_TYPE (innerop), op1);
|
||||
gimple_cond_set_lhs (stmt, innerop);
|
||||
|
|
|
|||
Loading…
Reference in New Issue