blob: f6fd69f4984e7d32ba020909cdd5341aae423160 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* { dg-do compile } */
/* { dg-options "-save-temps -O2" } */
/* Test that we emit a sub+subs sequence rather than mov+movk+cmp. */
int
foo (int x)
{
return x == 0x123456;
}
long long
fool (long long x)
{
return x == 0x123456;
}
/* { dg-final { scan-assembler-not "cmp\tw\[0-9\]*.*" } } */
/* { dg-final { scan-assembler-not "cmp\tx\[0-9\]*.*" } } */
/* { dg-final { scan-assembler-times "sub\tw\[0-9\]+.*" 1 } } */
/* { dg-final { scan-assembler-times "sub\tx\[0-9\]+.*" 1 } } */
/* { dg-final { scan-assembler-times "subs\tw\[0-9\]+.*" 1 } } */
/* { dg-final { scan-assembler-times "subs\tx\[0-9\]+.*" 1 } } */
|