This is an archive of the discontinued LLVM Phabricator instance.

[EarlyCSE][OpaquePointers]Replace assert with return for mask type check.
ClosedPublic

Authored by dantrushin on Aug 5 2022, 3:47 AM.

Details

Summary

When EarlyCSE tries to common vector masked loads/stores, it first checks that
they have same base operand and then assumes that this is enough for mask types
to be equal. This is true for typed pointers but false for opaque ones -
two loads of different vector sizes from same base pointer '%b' are the same,
ptr %b. (For typed pointers, %b was cast to vector pointer type so bases
were different).
Change assert to return from lambda isSubmask so this transformation properly
works with opaque pointers.

Diff Detail

Event Timeline

dantrushin created this revision.Aug 5 2022, 3:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2022, 3:47 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
dantrushin requested review of this revision.Aug 5 2022, 3:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2022, 3:47 AM
nikic accepted this revision.Aug 5 2022, 7:55 AM

LGTM

This revision is now accepted and ready to land.Aug 5 2022, 7:55 AM
This revision was landed with ongoing or failed builds.Aug 8 2022, 6:15 AM
This revision was automatically updated to reflect the committed changes.