Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-28.c @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* PR37997 */ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-pre-details -fno-code-hoisting" } */ int foo (int i, int b, int result) { int mask; if (b) mask = -2; else mask = 0; result = i + 1; result = result & mask; return result; } /* We should insert i + 1 into the if (b) path as well as the simplified i + 1 & -2 expression. And do replacement with two PHI temps. */ /* With hoisting enabled we'd hoist i + 1 to before the if, retaining only one PHI node. */ /* { dg-final { scan-tree-dump-times "with prephitmp" 2 "pre" } } */