peepmatic: Fix a failed assertion due to extra iterations after fixed point
After replacing an instruction with an alias to an earlier value, trying to further optimize that value is unnecessary, since we've already processed it, and also was triggering an assertion.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
test simple_preopt
|
||||
target x86_64
|
||||
|
||||
;; This file used to trigger assertions where we would keep trying to
|
||||
;; unnecessarily apply optimizations after replacing an instruction with an
|
||||
;; alias of another value that we had already optimized.
|
||||
|
||||
function %foo() {
|
||||
block0:
|
||||
v0 = iconst.i32 3
|
||||
v1 = srem_imm v0, 2
|
||||
v2 = sdiv_imm v1, 1
|
||||
trap unreachable
|
||||
}
|
||||
Reference in New Issue
Block a user