1 /* { dg-do compile { target { { aarch64*-*-* i?86-*-* x86_64-*-* } && lp64 } } } */
2 /* { dg-options "-fdump-rtl-ce1 -O2 --param max-rtl-if-conversion-unpredictable-cost=100" } */
3
4 typedef long long s64;
5
6 int
foo(s64 a,s64 b,s64 c)7 foo (s64 a, s64 b, s64 c)
8 {
9 s64 d = a - b;
10
11 if (d == 0)
12 return a + c;
13 else
14 return b + d + c;
15 }
16
17 /* This test can be reduced to just return a + c; */
18 /* { dg-final { scan-rtl-dump "3 true changes made" "ce1" } } */
19 /* { dg-final { scan-assembler-not "sub\.*\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+\.*" { target { aarch64*-*-* } } } } */
20