Also consider fixed outputs for replace_global_defines.

Fixes #178.

When an instruction with a fixed output operand defines a globally live
SSA value, we need to check if the fixed register is available in the
`regs.global` set of registers that can be used across EBB boundaries.

If the fixed output register is not available in regs.global, set the
replace_global_defines flag so the output operands are rewritten as
local values.
This commit is contained in:
Jakob Stoklund Olesen
2017-10-25 14:28:30 -07:00
parent 1b71285b34
commit d37126565e
2 changed files with 63 additions and 8 deletions

View File

@@ -0,0 +1,17 @@
test compile
set is_64bit=1
isa intel haswell
function %foo() native {
ebb4:
v3 = iconst.i32 0
jump ebb3
ebb3:
v9 = udiv v3, v3
jump ebb1
ebb1:
v19 = iadd.i32 v9, v9
jump ebb3
}