Skip to content

Commit 2fe1efb

Browse files
authored
codegen load/store/union cleanup and fix (#60353)
Working with Claude to try to de-duplicate and simplify/cleanup some of the code here (esp. union_store) that has grown chaotic over time, and fix bugs. Fix#60345, Fix#60355 (and other hypothetical similar issues)
2 parents 1806b0b + 3683074 commit 2fe1efb

File tree

4 files changed

+660
-616
lines changed

4 files changed

+660
-616
lines changed

‎Compiler/test/codegen.jl‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,3 +1075,13 @@ let io = IOBuffer()
10751075
str =String(take!(io))
10761076
@testoccursin("julia.write_barrier", str)
10771077
end
1078+
1079+
# Test phi node codegen for union types with inline roots
1080+
functionunion_phi_inline_roots(x::Bool)
1081+
if x
1082+
return ("Q8", 1)
1083+
else
1084+
return ("Q10", Ref(5))
1085+
end
1086+
end
1087+
@testunion_phi_inline_roots(true) === ("Q8", 1)

0 commit comments

Comments
(0)