1 /* Verify that mov is preferred on XScale for loading a 2 byte constant. */
2 /* { dg-do compile } */
3 /* { dg-options "-mcpu=xscale -O" } */
4 /* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-march=*" } { "-march=xscale" } } */
5 /* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-mcpu=*" } { "-mcpu=xscale" } } */
6 /* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */
7 /* { dg-require-effective-target arm32 } */
8 
9 unsigned load2(void) __attribute__ ((naked));
load2(void)10 unsigned load2(void)
11 {
12     /* Best code would be:
13        mov r0, =272
14        add r0, r0, =1
15        mov pc, lr */
16 
17     return 273;
18 }
19 
20 /* { dg-final { scan-assembler "mov\[ 	].*272" } } */
21