Skip to content

Commit fcb5a66

Browse files
gbaraldiKristoffer Carlsson
authored andcommitted
Fix removal of globals with addrspaces in removeAddrspaces (#58322)
(cherry picked from commit 088bb90)
1 parent ec2763b commit fcb5a66

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/llvmpasses/remove-addrspaces.ll

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
; RUN: opt -enable-new-pm=1 --opaque-pointers=1 --load-pass-plugin=libjulia-codegen%shlibext -passes='RemoveJuliaAddrspaces' -S %s | FileCheck %s --check-prefixes=CHECK,OPAQUE
66

7+
; COM: check that the addrspace of the global itself is removed
8+
; OPAQUE: @ejl_enz_runtime_exc = external global {}
9+
@ejl_enz_runtime_exc = external addrspace(10) global {}
710

811
; COM: check that package image fptrs work
912
@pjlsys_BoundsError_32 = internal global {} addrspace(10)* ({}***, {} addrspace(10)*, [1 x i64] addrspace(11)*)* null
@@ -133,6 +136,13 @@ L6:
133136
}
134137

135138

139+
define private fastcc void @diffejulia__mapreduce_97() {
140+
L6:
141+
; OPAQUE: store atomic ptr @ejl_enz_runtime_exc, ptr null unordered
142+
store atomic {} addrspace(10)* @ejl_enz_runtime_exc, {} addrspace(10)* addrspace(10)* null unordered, align 8
143+
unreachable
144+
}
145+
136146
; COM: check that function attributes are preserved on declarations too
137147
declare void @convergent_function() #0
138148
attributes #0 = { convergent }

0 commit comments

Comments
 (0)