Skip to content

Commit c981415

Browse files
wsmosesvchuravy
authored andcommitted
Add test
1 parent d747572 commit c981415

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/llvmpasses/late-lower-gc.ll

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,25 @@ define {} addrspace(10)* @gclift_switch({} addrspace(13)* addrspace(10)* %input,
148148
ret {} addrspace(10)* %ret
149149
}
150150

151+
define void @decayar([2 x {} addrspace(10)* addrspace(11)*] %ar) {
152+
%v2 = call {}*** @julia.get_pgcstack()
153+
%e0 = extractvalue [2 x {} addrspace(10)* addrspace(11)*] %ar, 0
154+
%l0 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %e0
155+
%e1 = extractvalue [2 x {} addrspace(10)* addrspace(11)*] %ar, 1
156+
%l1 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %e1
157+
%r = call i32 @callee_root({} addrspace(10)* %l0, {} addrspace(10)* %l1)
158+
ret void
159+
}
160+
161+
; CHECK-LABEL: @decayar
162+
; CHECK: %gcframe = call {} addrspace(10)** @julia.new_gc_frame(i32 2)
163+
; CHECK: %1 = call {} addrspace(10)** @julia.get_gc_frame_slot({} addrspace(10)** %gcframe, i32 1)
164+
; CHECK: store {} addrspace(10)* %l0, {} addrspace(10)** %1, align 8
165+
; CHECK: %2 = call {} addrspace(10)** @julia.get_gc_frame_slot({} addrspace(10)** %gcframe, i32 0)
166+
; CHECK: store {} addrspace(10)* %l1, {} addrspace(10)** %2, align 8
167+
; CHECK: %r = call i32 @callee_root({} addrspace(10)* %l0, {} addrspace(10)* %l1)
168+
; CHECK: call void @julia.pop_gc_frame({} addrspace(10)** %gcframe)
169+
151170
!0 = !{i64 0, i64 23}
152171
!1 = !{!1}
153172
!2 = !{!7} ; scope list

0 commit comments

Comments
 (0)