x64: Prevent load sinking in simd f{min,max}#9144
Merged
fitzgen merged 1 commit intobytecodealliance:mainfrom Aug 19, 2024
Merged
x64: Prevent load sinking in simd f{min,max}#9144fitzgen merged 1 commit intobytecodealliance:mainfrom
fitzgen merged 1 commit intobytecodealliance:mainfrom
Conversation
This commit fixes an issue where a `Value` was both load-sunk and used as-is, meaning it was both sunk and not. That triggered a panic in the backend since this isn't valid. The reason for this is due to how some ISLE rules were written where a `Value` was both implicitly coerced into an `XmmMem` and an `Xmm`. This issue is similar to bytecodealliance#4815 for example. The fix in this commit is to force the operands into registers which prevents load sinking which wouldn't work here anyway. This panic was introduced in bytecodealliance#5841 which is quite old at this point. This bug does not affect WebAssembly translation due to how the `v128` type maps to `i8x16` in Cranelift by default. Closes bytecodealliance#9143
fitzgen
approved these changes
Aug 19, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit fixes an issue where a
Valuewas both load-sunk and used as-is, meaning it was both sunk and not. That triggered a panic in the backend since this isn't valid. The reason for this is due to how some ISLE rules were written where aValuewas both implicitly coerced into anXmmMemand anXmm. This issue is similar to #4815 for example. The fix in this commit is to force the operands into registers which prevents load sinking which wouldn't work here anyway.This panic was introduced in #5841 which is quite old at this point. This bug does not affect WebAssembly translation due to how the
v128type maps toi8x16in Cranelift by default.Closes #9143