Make spilling visit fallthrough_return instructions too.

This is a followup to af2a952aabd82cf401cc664d0262b139ff92d86b. It
teaches the spilling pass to use the is_ghost() property to test whether
to visit instructions. This fixes a bug handling multiple return values
with fallthrough_return.
This commit is contained in:
Dan Gohman
2018-11-06 11:14:14 -08:00
committed by Benjamin Bouvier
parent ef2e11265c
commit cd7c57e598
2 changed files with 64 additions and 50 deletions

View File

@@ -11,3 +11,13 @@ ebb0:
; check: v2 = iconst.i64 0
; check: v3 = copy v2
; check: return v2, v3
; Same thing, now with a fallthrough_return.
function %multiple_returns() -> i64, i64 {
ebb0:
v2 = iconst.i64 0
fallthrough_return v2, v2
}
; check: v2 = iconst.i64 0
; check: v3 = copy v2
; check: fallthrough_return v2, v3