Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.target / i386 / cmov1.c
blobedbbda5848225b2796a758c9000ca71aaa9d9790
1 /* { dg-do compile } */
2 /* This test checks for absolute memory operands. */
3 /* { dg-require-effective-target nonpic } */
4 /* { dg-options "-O2 -march=k8" } */
5 /* { dg-final { scan-assembler "sar\[^\\n\]*magic_namea" } } */
6 /* { dg-final { scan-assembler "sar\[^\\n\]*magic_nameb" } } */
7 /* { dg-final { scan-assembler "sar\[^\\n\]*magic_namec" } } */
8 /* { dg-final { scan-assembler "shr\[^\\n\]*magic_named" } } */
9 /* { dg-final { scan-assembler "shr\[^\\n\]*magic_namee" } } */
10 /* { dg-final { scan-assembler "shr\[^\\n\]*magic_namef" } } */
12 /* Check code generation for several conditional moves doable by single arithmetics. */
14 static int magic_namea;
15 static char magic_nameb;
16 static short magic_namec;
17 static int magic_named;
18 static char magic_namee;
19 static short magic_namef;
21 unsigned int gen;
22 void m(void)
24 magic_namec=magic_namec>=0?0:-1;
25 magic_namea=magic_namea>=0?0:-1;
26 magic_nameb=magic_nameb>=0?0:-1;
27 magic_named=magic_named>=0?0:1;
28 magic_namee=magic_namee>=0?0:1;
29 magic_namef=magic_namef>=0?0:1;