summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/cmov.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/X86/cmov.ll')
-rw-r--r--llvm/test/CodeGen/X86/cmov.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/cmov.ll b/llvm/test/CodeGen/X86/cmov.ll
index 1e6efc205d2..f53966c905a 100644
--- a/llvm/test/CodeGen/X86/cmov.ll
+++ b/llvm/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
+}
OpenPOWER on IntegriCloud