diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-16 18:23:00 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-16 18:23:00 +0000 |
commit | 805e22b2051e9c6a75377ea6599654d7415da483 (patch) | |
tree | c259697c448b0c6f548f153c48c46a8d7a75970f /gcc/testsuite/gcc.dg/i386-cmov1.c | |
parent | 2c27ce73ee2229b0871c4ccad2342d8a4be85eff (diff) | |
download | ppe42-gcc-805e22b2051e9c6a75377ea6599654d7415da483.tar.gz ppe42-gcc-805e22b2051e9c6a75377ea6599654d7415da483.zip |
Merge basic-improvements-branch to trunk
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/i386-cmov1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/i386-cmov1.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/i386-cmov1.c b/gcc/testsuite/gcc.dg/i386-cmov1.c new file mode 100644 index 00000000000..1f7ff727bc4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/i386-cmov1.c @@ -0,0 +1,29 @@ +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ +/* { dg-options "-O2 -march=athlon" } */ +/* { dg-final { scan-assembler "sar.*magic_namea" } } */ +/* { dg-final { scan-assembler "sar.*magic_nameb" } } */ +/* { dg-final { scan-assembler "sar.*magic_namec" } } */ +/* { dg-final { scan-assembler "shr.*magic_named" } } */ +/* { dg-final { scan-assembler "shr.*magic_namee" } } */ +/* { dg-final { scan-assembler "shr.*magic_namef" } } */ + +/* Check code generation for several conditional moves doable by single arithmetics. */ + +int magic_namea; +char magic_nameb; +short magic_namec; +int magic_named; +char magic_namee; +short magic_namef; + +unsigned int gen; +m() +{ + magic_namec=magic_namec>=0?0:-1; + magic_namea=magic_namea>=0?0:-1; + magic_nameb=magic_nameb>=0?0:-1; + magic_named=magic_named>=0?0:1; + magic_namee=magic_namee>=0?0:1; + magic_namef=magic_namef>=0?0:1; +} + |