[AArch64] Peephole for SUBS
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / subs_compare_1.c
blob95c8f696fee7e992c27625108850c02319426de5
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 int
5 foo (int a, int b)
7 int x = a - b;
8 if (a <= b)
9 return x;
10 else
11 return 0;
14 /* { dg-final { scan-assembler-times "subs\\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" 1 } } */
15 /* { dg-final { scan-assembler-not "cmp\\tw\[0-9\]+, w\[0-9\]+" } } */