Add a testcase to confirm the equivalence's are being checked by EVRP.
* gcc.dg/tree-ssa/evrp30.c: New.
This commit is contained in:
parent
a0accaa998
commit
ce3316e9c0
1 changed files with 16 additions and 0 deletions
16
gcc/testsuite/gcc.dg/tree-ssa/evrp30.c
Normal file
16
gcc/testsuite/gcc.dg/tree-ssa/evrp30.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
/* Confirm the ranger is picking up a relationship with equivalences. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-tree-evrp" } */
|
||||
|
||||
extern void foo ();
|
||||
|
||||
void f (unsigned int a, unsigned int b)
|
||||
{
|
||||
if (a == b)
|
||||
for (unsigned i = 0; i < a; i++)
|
||||
if (i == b) // Confirm i < a also means i < b.
|
||||
foo (); /* Unreachable */
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "foo\\(" 0 "evrp"} } */
|
||||
|
Loading…
Add table
Reference in a new issue