[WebAssembly] Don't stackify multi-def instructions (#200429) - #3
Merged
Merged
Conversation
This commit updates the `WebAssemblyRegStackify.cpp` pass to specifically exclude attempting to stackify the first def of a multi-def instruction. As the previous comments indicate this is possible to do in some situations, but the current logic is incomplete and has led to miscompilations such as llvm#98323 and llvm#199910. One option would be to make the logic more robust, but in lieu of that in the meantime the change here is to completely disable stackification in these situations. This provides at least a "known working" base to build on later and fixes the known regressions around this. Closes llvm#98323 Closes llvm#199910 Backport to LLVM 21.1.2. Adapt the multivalue.ll REGS check to the older WebAssembly register-printer syntax. (cherry picked from commit b472674)
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 updates the
WebAssemblyRegStackify.cpppass to specifically exclude attempting to stackify the first def of a multi-def instruction. As the previous comments indicate this is possible to do in some situations, but the current logic is incomplete and has led to miscompilations such as llvm#98323 and llvm#199910. One option would be to make the logic more robust, but in lieu of that in the meantime the change here is to completely disable stackification in these situations. This provides at least a "known working" base to build on later and fixes the known regressions around this.Closes llvm#98323
Closes llvm#199910
Backport to LLVM 21.1.2. Adapt the multivalue.ll REGS check to the older WebAssembly register-printer syntax.
(cherry picked from commit b472674)