2018-12-09 22:47:53 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
|
|
; RUN: llc -mtriple=x86_64-- < %s | FileCheck %s
|
2015-05-29 06:12:27 +08:00
|
|
|
|
|
|
|
define i2 @f(i32 %arg) {
|
2018-12-09 22:47:53 +08:00
|
|
|
; CHECK-LABEL: f:
|
|
|
|
; CHECK: # %bb.0:
|
2018-12-13 01:58:27 +08:00
|
|
|
; CHECK-NEXT: # kill: def $edi killed $edi def $rdi
|
|
|
|
; CHECK-NEXT: leal (%rdi,%rdi), %eax
|
2018-12-09 22:47:53 +08:00
|
|
|
; CHECK-NEXT: orb $1, %al
|
|
|
|
; CHECK-NEXT: # kill: def $al killed $al killed $eax
|
|
|
|
; CHECK-NEXT: retq
|
2015-05-29 06:12:27 +08:00
|
|
|
%trunc = trunc i32 %arg to i1
|
|
|
|
%sext = sext i1 %trunc to i2
|
|
|
|
%or = or i2 %sext, 1
|
|
|
|
ret i2 %or
|
|
|
|
}
|
2018-12-09 22:47:53 +08:00
|
|
|
|