Make GVN aware of instructions that write to CPU flags.
This commit is contained in:
@@ -23,3 +23,19 @@ ebb0:
|
||||
v5 = iadd v4, v3
|
||||
return v5
|
||||
}
|
||||
|
||||
function %cpu_flags() -> b1 {
|
||||
ebb0:
|
||||
v0 = iconst.i32 7
|
||||
v1 = iconst.i32 8
|
||||
v2 = ifcmp v0, v1
|
||||
v3 = trueif eq v2
|
||||
v4 = ifcmp v0, v1
|
||||
v5 = trueif eq v4
|
||||
v6 = bor v3, v5
|
||||
; check: v2 = ifcmp v0, v1
|
||||
; check: v3 = trueif eq v2
|
||||
; check: v4 = ifcmp v0, v1
|
||||
; check: v5 = trueif eq v4
|
||||
return v6
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user