Skip to content

Commit 4c41e7c

Browse files
committed
[X86] Add the second test case mentioned on Issue #65895
1 parent 0d0ca51 commit 4c41e7c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

llvm/test/CodeGen/X86/pr65895.ll

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,24 @@ for.end:
5858
store i64 %conv11, ptr @e, align 8
5959
ret i32 0
6060
}
61+
62+
declare void @bar(i32)
63+
define void @foo(i8 %arg) nounwind {
64+
; CHECK-LABEL: foo:
65+
; CHECK: # %bb.0: # %entry
66+
; CHECK-NEXT: pushq %rax
67+
; CHECK-NEXT: addb $-109, %dil
68+
; CHECK-NEXT: movsbl %dil, %eax
69+
; CHECK-NEXT: leal 1(%rax,%rax,2), %edi
70+
; CHECK-NEXT: callq bar@PLT
71+
; CHECK-NEXT: popq %rax
72+
; CHECK-NEXT: retq
73+
entry:
74+
%0 = add nsw i8 %arg, -109
75+
%1 = sext i8 %0 to i32
76+
%reassoc = shl i32 %1, 1
77+
%2 = add i32 %1, 1
78+
%3 = add i32 %2, %reassoc
79+
call void @bar(i32 %3)
80+
ret void
81+
}

0 commit comments

Comments
 (0)