Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit 6fd0bcd

Browse files
committed
[X86] Add a fast-isel test for the i8 pseudo cmov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316827 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 3445b00 commit 6fd0bcd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,3 +277,17 @@ define float @select_icmp_sle_f32(i64 %a, i64 %b, float %c, float %d) {
277277
ret float %2
278278
}
279279

280+
define i8 @select_icmp_sle_i8(i64 %a, i64 %b, i8 %c, i8 %d) {
281+
; CHECK-LABEL: select_icmp_sle_i8:
282+
; CHECK: ## BB#0:
283+
; CHECK-NEXT: cmpq %rsi, %rdi
284+
; CHECK-NEXT: jle LBB12_2
285+
; CHECK-NEXT: ## BB#1:
286+
; CHECK-NEXT: movl %ecx, %edx
287+
; CHECK-NEXT: LBB12_2:
288+
; CHECK-NEXT: movl %edx, %eax
289+
; CHECK-NEXT: retq
290+
%1 = icmp sle i64 %a, %b
291+
%2 = select i1 %1, i8 %c, i8 %d
292+
ret i8 %2
293+
}

0 commit comments

Comments
 (0)