Repository navigation
Commit 979b679
Bitcast a moved stack slot to a pointee-changing addrspacecast's type
When a stack slot moves to the heap, RecursivelyReplaceAddressSpace replaced
an addrspacecast into the new allocation's address space by the allocation
itself. With typed pointers an addrspacecast may also change the pointee
type: instcombine folds a bitcast into it, as in Julia's
`addrspacecast T* %slot to i8 addrspace(11)*` for jl_object_id_. The call
then received a pointer of the allocation's type and failed verification
("Call parameter type does not match function signature!"). Replace such a
cast by a bitcast of the allocation to the cast's type. With opaque pointers
the types are equal and nothing changes.
Julia 1.10 hits this through Base.view of a SubArray of a custom
AbstractArray inside a non-inlined function that holds it in a stack slot:
view calls unalias, whose dataids take the objectid of the parent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KtEN3g4xbzjw9VURDXoFTE1 parent 3a825a5 commit 979b679
2 files changed
Lines changed: 63 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
308 | 317 | | |
309 | 318 | | |
310 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
0 commit comments