Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[InstCombine] use logical-or matcher to avoid crash
This should prevent crashing for the example in issue #58552 by not matching a select-of-vectors-with-scalar-condition. A similar change is likely needed for the related fold to properly fix that kind of bug. The test that shows a regression seems unlikely to occur in real code. This also picks up an optimization in the case where a real (bitwise) logic op is used. We could already convert some similar select ops to real logic via impliesPoison(), so we don't see more diffs on commuted tests. Using commutative matchers (when safe) might also handle one of the TODO tests.
- Loading branch information
1 parent
29661fe
commit ec0b406
Showing
2 changed files
with
30 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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