This is an archive of the discontinued LLVM Phabricator instance.

[PatternMatch] don't match a scalar select of bool vectors as a logical-and or logical-or
ClosedPublic

Authored by spatel on Nov 1 2022, 9:31 AM.

Details

Summary

Most folds based on these matchers already check to make sure the condition type is the same as the select type, and it seems unlikely that a fold would want to handle a scalar-select-of-vectors pattern (there are no regression tests for it).

This is a preliminary step for fixing #issue 58552. The fold(s) responsible for that crash (D101807, D101375) don't use the matchers yet, but they probably should.

Diff Detail

Event Timeline

spatel created this revision.Nov 1 2022, 9:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 1 2022, 9:31 AM
Herald added a subscriber: mcrosier. · View Herald Transcript
spatel requested review of this revision.Nov 1 2022, 9:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 1 2022, 9:31 AM
nikic accepted this revision.Nov 1 2022, 10:12 AM

LGTM

This revision is now accepted and ready to land.Nov 1 2022, 10:12 AM