diff options
-rw-r--r-- | test/CodeGen/X86/cmov.ll | 10 | ||||
-rw-r--r-- | test/CodeGen/X86/select-i8.ll | 12 |
2 files changed, 10 insertions, 12 deletions
diff --git a/test/CodeGen/X86/cmov.ll b/test/CodeGen/X86/cmov.ll index 1e6efc205d..f53966c905 100644 --- a/test/CodeGen/X86/cmov.ll +++ b/test/CodeGen/X86/cmov.ll @@ -141,3 +141,13 @@ entry: } +; Don't try to use a 16-bit conditional move to do an 8-bit select, +; because it isn't worth it. Just use a branch instead. +define i8 @test7(i1 inreg %c, i8 inreg %a, i8 inreg %b) nounwind { +; CHECK: test7: +; CHECK: testb $1, %dil +; CHECK-NEXT: jne LBB + + %d = select i1 %c, i8 %a, i8 %b + ret i8 %d +} diff --git a/test/CodeGen/X86/select-i8.ll b/test/CodeGen/X86/select-i8.ll deleted file mode 100644 index a7fb00e17b..0000000000 --- a/test/CodeGen/X86/select-i8.ll +++ /dev/null @@ -1,12 +0,0 @@ -; RUN: llc < %s -march=x86 > %t -; RUN: not grep movz %t -; RUN: not grep cmov %t -; RUN: grep movb %t | count 2 - -; Don't try to use a 16-bit conditional move to do an 8-bit select, -; because it isn't worth it. Just use a branch instead. - -define i8 @foo(i1 inreg %c, i8 inreg %a, i8 inreg %b) { - %d = select i1 %c, i8 %a, i8 %b - ret i8 %d -} |