fix: panic on aarch64 when combining bitcasting with vector operations#12697
fix: panic on aarch64 when combining bitcasting with vector operations#12697cfallin merged 6 commits intobytecodealliance:mainfrom
Conversation
|
Thanks! However I note that Also, I think that |
Hi, if I use So I will keep this to |
That's pretty surprising: it should be equivalent to the composition of the two matchers you used, and triggering other errors is indicative of something we should fix, not run away from. It looks like the definition is about what I would expect, except that maybe it's missing a check for |
…f fits_in_32 + ty_int
Thanks for clarifying! I've patched the |
Fixes #12696
Desc
This PR fixes a panic bug in
cranelift-codegen.In current implementation,
iaddinstruction inlower.islematches all 64-bit or smaller types and picks a GPR-basediaddfor them.We use
(ty_int ty)to ensure that only integer values are accepted, and all vector values go to the vector version ofiadd.Changes
lower.islenow matches theiadd for scalarrules for scalar values only when the input value is a scalar.Added
cranelift/filetests/filetests/runtests/issue-12696.cliffor regression test.