llvm-for-llvmta/test/CodeGen/X86/pr23664.ll

18 lines
499 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=x86_64-- < %s | FileCheck %s
define i2 @f(i32 %arg) {
; CHECK-LABEL: f:
; CHECK: # %bb.0:
; CHECK-NEXT: # kill: def $edi killed $edi def $rdi
; CHECK-NEXT: leal (%rdi,%rdi), %eax
; CHECK-NEXT: orb $1, %al
; CHECK-NEXT: # kill: def $al killed $al killed $eax
; CHECK-NEXT: retq
%trunc = trunc i32 %arg to i1
%sext = sext i1 %trunc to i2
%or = or i2 %sext, 1
ret i2 %or
}