myunbin opened PR #13031 from myunbin:fix-ext/red to bytecodealliance:main:
Cause
This regression was caused by the
ireduce(xext(a) +/- xext(b)) -> a +/- bsimplification rules added incranelift/codegen/src/opts/arithmetic.isle.These rewrites only check that both operands are extended to the same wide type (
cty). They do not verify that the original operand types match the final reduced type (ty), or even match each other.For example, a pattern such as:
ireduce.i32 (iadd.i64 (sextend.i64 x:i16) (uextend.i64 y:i32))can be rewritten into:
iadd.i32 x, ywhich is ill-typed, because
xis stilli16while the new instruction expects both operands to bei32.
This matches the verifier failure we observed.Resolution
We decided to remove these rules for now.
Thanks for reporting this issue.
myunbin requested wasmtime-compiler-reviewers for a review on PR #13031.
myunbin requested fitzgen for a review on PR #13031.
cfallin submitted PR review:
Thanks for the quick response!
cfallin has enabled auto merge for PR #13031.
cfallin added PR #13031 [Cranelift] resolves #13306, delete extend/reduce rule to the merge queue.
cfallin merged PR #13031.
cfallin removed PR #13031 [Cranelift] resolves #13306, delete extend/reduce rule from the merge queue.
Last updated: Apr 12 2026 at 23:10 UTC