re PR tree-optimization/47061 (VRP doesn't propagate through x<<=1, but it does for x*=2)
2012-06-29 Richard Guenther <rguenther@suse.de> PR tree-optimization/47061 * gcc.dg/tree-ssa/vrp71.c: New testcase. From-SVN: r189076
This commit is contained in:
parent
76744c1746
commit
7211c82f34
2 changed files with 27 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-06-29 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/47061
|
||||
* gcc.dg/tree-ssa/vrp71.c: New testcase.
|
||||
|
||||
2012-06-29 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/37541
|
||||
|
|
22
gcc/testsuite/gcc.dg/tree-ssa/vrp71.c
Normal file
22
gcc/testsuite/gcc.dg/tree-ssa/vrp71.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-tree-vrp1" } */
|
||||
|
||||
int foo(int *p)
|
||||
{
|
||||
int x = -10;
|
||||
if (p[0]) x++;
|
||||
if (p[1]) x++;
|
||||
if (p[2]) x++;
|
||||
if (p[3]) x++;
|
||||
x <<= 2;
|
||||
return (x > 0);
|
||||
}
|
||||
|
||||
int bar(char c)
|
||||
{
|
||||
int i = c << 1;
|
||||
return i > 1000;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "return 0;" 2 "vrp1" } } */
|
||||
/* { dg-final { cleanup-tree-dump "vrp1" } } */
|
Loading…
Add table
Reference in a new issue