Add an explicit "is_ghost" property to selected instructions, and use that to determine whether reload and coloring should visit instructions. This allows them to visit fallthrough_return instructions and insert fills and register moves as needed.
24 lines
365 B
Plaintext
24 lines
365 B
Plaintext
test regalloc
|
|
target x86_64
|
|
|
|
; Test that fallthrough returns are visited by reload and coloring.
|
|
|
|
function %foo() -> f64 {
|
|
fn0 = %bar()
|
|
|
|
ebb0:
|
|
v0 = f64const 0.0
|
|
call fn0()
|
|
fallthrough_return v0
|
|
}
|
|
; check: fill v0
|
|
|
|
function %foo() -> f64 {
|
|
fn0 = %bar() -> f64, f64
|
|
|
|
ebb0:
|
|
v0, v1 = call fn0()
|
|
fallthrough_return v1
|
|
}
|
|
; check: regmove v1, %xmm1 -> %xmm0
|