Files
wasmtime/cranelift/filetests/regalloc/output-interference.cton
Jakob Stoklund Olesen e8ecf1f809 Add a FixedTied constraint kind for operand constraints.
Fixes #175.

The Intel division instructions have fixed input operands that are
clobbered by fixed output operands, so the value passed as an input will
be clobbered just like a tied operand.

The FixedTied operand constraint is used to indicate a fixed input
operand that has a corresponding output operand with the same fixed
register.

Teach the spiller to teach a FixedTied operand the same as a Tied
operand constraint and make sure that the input value is killed by the
instruction.
2017-10-25 11:22:20 -07:00

16 lines
370 B
Plaintext

test compile
set is_64bit=1
isa intel haswell
function %test(i64) -> i64 native {
ebb0(v0: i64):
v2 = iconst.i64 12
; This division clobbers two of its fixed input registers on Intel.
; These are FixedTied constraints that the spiller needs to resolve.
v5 = udiv v0, v2
v6 = iconst.i64 13
v9 = udiv v0, v6
v10 = iadd v5, v9
return v10
}