Skip to content

Commit b079469

Browse files
committed
Add test for testcall with range
1 parent eead1a5 commit b079469

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
2+
; RUN: opt -passes=ipsccp -S -mtriple=x86_64-linux < %s | llc -mtriple=x86_64-linux | FileCheck %s
3+
4+
define i32 @foo(ptr %this, ...) {
5+
; CHECK-LABEL: foo:
6+
; CHECK: # %bb.0: # %entry
7+
; CHECK-NEXT: movzbl 0, %eax
8+
; CHECK-NEXT: retq
9+
entry:
10+
%call = load volatile i1, ptr null, align 1
11+
%spec.select = zext i1 %call to i32
12+
ret i32 %spec.select
13+
}
14+
15+
define i32 @bar(ptr %this, ...) {
16+
; CHECK-LABEL: bar:
17+
; CHECK: # %bb.0: # %entry
18+
; CHECK-NEXT: xorl %edi, %edi
19+
; CHECK-NEXT: jmp foo@PLT # TAILCALL
20+
entry:
21+
%4 = musttail call i32 (ptr, ...) @foo(ptr null, ...)
22+
ret i32 %4
23+
}

0 commit comments

Comments
 (0)