Handle tied operands that are not killed by their use.
Any tied register uses are interesting enough to be added to the reguses list if their value is not killed. A copy needs to be inserted in that case.
This commit is contained in:
@@ -15,6 +15,19 @@ ebb0:
|
||||
return v2
|
||||
}
|
||||
|
||||
; Tied operand is live after instruction.
|
||||
function %tied_alive() -> i32 {
|
||||
ebb0:
|
||||
v0 = iconst.i32 12
|
||||
v1 = iconst.i32 13
|
||||
; check: $(v0c=$V) = copy $v0
|
||||
; check: $v2 = isub $v0c, $v1
|
||||
v2 = isub v0, v1
|
||||
; check: $v3 = iadd $v2, $v0
|
||||
v3 = iadd v2, v0
|
||||
return v3
|
||||
}
|
||||
|
||||
; Fixed register constraint.
|
||||
function %fixed_op() -> i32 {
|
||||
ebb0:
|
||||
|
||||
Reference in New Issue
Block a user