x64: Remove handling of cmpps and cmppd in produces_const#4714
Merged
elliottt merged 1 commit intoAug 15, 2022
Conversation
cfallin
approved these changes
Aug 15, 2022
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.
On
main, thecmppsandcmppdinstructions will be treated as producing constants if their arguments are the same and their immediate operand is0, which corresponds to ordered equality. The runtime behavior of this instruction is not constant however, as it will output a lane of0s if either of the corresponding components areNaN.This PR removes the special handling of
cmppsandcmppdfromproduces_const, as it's not correctly identifying constants. An alternative approach here would be to say that unordered equality will produce constants, looking instead for the immediate value8. We don't currently have any way of emitting unordered equality tests, so that would be an optimization that would be worth making if we add that capability in the future.