Skip to content

Commit

Permalink
[X86] Precommit a test
Browse files Browse the repository at this point in the history
This is for:

#60854
  • Loading branch information
kazutakahirata committed Feb 21, 2023
1 parent a942a94 commit fd5d92e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions llvm/test/CodeGen/X86/select_const.ll
Expand Up @@ -580,3 +580,18 @@ define i32 @select_ugt3_3_2(i32 %X) {
%cond = select i1 %cmp.inv, i32 3, i32 2
ret i32 %cond
}

define i32 @select_eq_1_2(i32 %a, i32 %b) {
; CHECK-LABEL: select_eq_1_2:
; CHECK: # %bb.0:
; CHECK-NEXT: xorl %ecx, %ecx
; CHECK-NEXT: cmpl %esi, %edi
; CHECK-NEXT: sete %cl
; CHECK-NEXT: movl $2, %eax
; CHECK-NEXT: subl %ecx, %eax
; CHECK-NEXT: retq

%cmp = icmp eq i32 %a, %b
%cond = select i1 %cmp, i32 1, i32 2
ret i32 %cond
}

0 comments on commit fd5d92e

Please sign in to comment.