Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-3.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-do run } */ /* { dg-options "-O -fno-tree-fre -fdump-tree-dom2" } */ extern void abort (void); int a; int __attribute__((noinline)) foo (int b) { a = 0; if (b) { a = 1; return a; } /* DOM should be able to CSE both loads here, forwarding 0 and 1 to the PHI feeding the return. */ return a; } int main() { if (foo (0) != 0 || foo (1) != 1) abort (); return 0; } /* { dg-final { scan-tree-dump "= PHI <\[01\]\\\(.\\\), \[01\]\\\(.\\\)>" "dom2" } } */