Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDAG] allow vector types for select->logic folds
This prepares codegen for a change that will remove the identical folds from IR because they are not poison-safe. See D93065 / D97360 for details. We already generically support scalar types, and there are various target-specific transforms that overlap the vector folds. For example, x86 recognizes the and patterns, but not or. We can end up with 1 extra instruction there, but I think that is still preferred over the blendv alternative that loads a constant vector. If this is not optimal, then it should be fixed with a later transform (this change is not expected to result in any regressions because InstCombine currently does the same thing). Removing custom code and supporting undefs in constant-pattern-matching can be follow-up changes. Differential Revision: https://reviews.llvm.org/D97730
- Loading branch information
1 parent
4096ae0
commit 7fce332
Showing
3 changed files
with
20 additions
and
22 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
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