diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/cmov2.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/cmov2.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/cmov2.c b/gcc/testsuite/gcc.target/i386/cmov2.c new file mode 100644 index 00000000000..cd6457f0d5f --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/cmov2.c @@ -0,0 +1,9 @@ +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ +/* { dg-options "-O2 -march=k8" } */ +/* { dg-final { scan-assembler "sbb" } } */ + +/* This conditional move is fastest to be done using sbb. */ +t(unsigned int a, unsigned int b) +{ + return (a<=b?5:-5); +} |