]> granicus.if.org Git - llvm/commitdiff
[X86] Add a fast-isel test for the i8 pseudo cmov.
authorCraig Topper <craig.topper@intel.com>
Sat, 28 Oct 2017 06:10:03 +0000 (06:10 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 28 Oct 2017 06:10:03 +0000 (06:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316827 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/X86/fast-isel-select-pseudo-cmov.ll

index b5c879f654b5b7fd79d5008d5ddcec7fad65f2c8..8724b66c911eb50b1f8bf3973fd191af0a197783 100644 (file)
@@ -277,3 +277,17 @@ define float @select_icmp_sle_f32(i64 %a, i64 %b, float %c, float %d) {
   ret float %2
 }
 
+define i8 @select_icmp_sle_i8(i64 %a, i64 %b, i8 %c, i8 %d) {
+; CHECK-LABEL: select_icmp_sle_i8:
+; CHECK:       ## BB#0:
+; CHECK-NEXT:    cmpq %rsi, %rdi
+; CHECK-NEXT:    jle LBB12_2
+; CHECK-NEXT:  ## BB#1:
+; CHECK-NEXT:    movl %ecx, %edx
+; CHECK-NEXT:  LBB12_2:
+; CHECK-NEXT:    movl %edx, %eax
+; CHECK-NEXT:    retq
+  %1 = icmp sle i64 %a, %b
+  %2 = select i1 %1, i8 %c, i8 %d
+  ret i8 %2
+}