From: Richard Biener Date: Tue, 25 Feb 2020 11:19:33 +0000 (+0100) Subject: testcase for last_vuse in FRE X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=81ef67c10a3db7d789c7be653dba0a6e6a3e9958;p=gcc.git testcase for last_vuse in FRE This adds a testcase for some basic FRE functionality. 2020-02-25 Richard Biener * gcc.dg/tree-ssa/ssa-fre-86.c: New testcase. --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d25296df65b..10bbb73fc3d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-02-25 Richard Biener + + * gcc.dg/tree-ssa/ssa-fre-86.c: New testcase. + 2020-02-25 Richard Biener PR tree-optimization/93868 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-86.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-86.c new file mode 100644 index 00000000000..d3da22c46c1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-86.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-fre1" } */ + +int foo(int *p, int b, float *q) +{ + int tem; + if (b) + { + *q = 0; + tem = *p; + } + else + { + *q = 1; + tem = *p; + } + return *p - tem; +} + +/* { dg-final { scan-tree-dump "return 0;" "fre1" } } */