Merge from mainline.
[official-gcc.git] / gcc / testsuite / gcc.dg / arm-g2.c
bloba15b280cc107b632e4cb23a7cfbf98085447e530
1 /* Verify that hardware multiply is preferred on XScale. */
2 /* { dg-do compile } */
3 /* { dg-options "-mcpu=xscale -O2" } */
4 /* { dg-require-effective-target arm32 } */
6 /* Brett Gaines' test case. */
7 unsigned BCPL(unsigned) __attribute__ ((naked));
8 unsigned BCPL(unsigned seed)
10 /* Best code would be:
11 ldr r1, =2147001325
12 ldr r2, =715136305
13 mla r0, r1, r0, r2
14 mov pc, lr */
16 return seed * 2147001325U + 715136305U;
19 /* { dg-final { scan-assembler "mla\[ ].*" } } */