Skip to content

Commit 029abad

Browse files
gbaraldiKristofferC
authored andcommitted
Fix removal of globals with addrspaces in removeAddrspaces (#58322)
(cherry picked from commit 088bb90)
1 parent 7ac9a80 commit 029abad

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
@@ -3,6 +3,9 @@
33
; RUN: opt -enable-new-pm=0 --opaque-pointers=0 -load libjulia-codegen%shlibext -RemoveJuliaAddrspaces -S %s | FileCheck %s --check-prefixes=CHECK,TYPED
44
; RUN: opt -enable-new-pm=1 --opaque-pointers=0 --load-pass-plugin=libjulia-codegen%shlibext -passes='RemoveJuliaAddrspaces' -S %s | FileCheck %s --check-prefixes=CHECK,TYPED
55

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

710
; COM: check that the addrspace of the global itself is removed
811
; OPAQUE: @ejl_enz_runtime_exc = external global {}
@@ -131,6 +134,13 @@ L6:
131134
unreachable
132135
}
133136

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

0 commit comments

Comments
 (0)