This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Add memory size for CSEMap ID calculation
ClosedPublic

Authored by AlexM on Jun 24 2023, 1:08 PM.

Details

Summary

In NVPTX ReplaceVectorLoad(), i1 and i8 types are promoted to i16,
followed by a truncate operation. Thus, v2i8 (or v2i1) and v2i16 will
have the same VTList, which causes a collision in CSEMap.

To differentiate the original VTList, let's add the size in generating
an ID. Otherwise the compiler crashes in refineAlignment:
MMO->getSize() == getSize() && "Size mismatch!"

Diff Detail

Event Timeline

AlexM created this revision.Jun 24 2023, 1:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2023, 1:08 PM
AlexM updated this revision to Diff 534358.Jun 25 2023, 9:56 AM

Remove erroneously included file

AlexM published this revision for review.Jun 25 2023, 10:11 AM
AlexM added a reviewer: goldstein.w.n.
Herald added a project: Restricted Project. · View Herald TranscriptJun 25 2023, 10:11 AM

Would memory VT work? That's what regular load/store use I think.

AlexM updated this revision to Diff 534774.Jun 26 2023, 3:51 PM

Switch to memory VT

AlexM added a comment.Jun 26 2023, 3:52 PM

Would memory VT work? That's what regular load/store use I think.

Yea, that would work as well, I've the diff over.

This revision is now accepted and ready to land.Jun 26 2023, 3:54 PM
AlexM added a comment.Jun 26 2023, 3:59 PM

@craig.topper Thanks, can you please commit this on my behalf?

This revision was landed with ongoing or failed builds.Jun 26 2023, 4:13 PM
This revision was automatically updated to reflect the committed changes.