This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Add scalarSameSizeAs LegalizeRule
ClosedPublic

Authored by arsenm on Jul 22 2020, 8:47 AM.

Details

Summary

Widen or narrow a type to a type with the same scalar size as
another. This can be used to force G_PTR_ADD/G_PTRMASK's scalar
operand to match the bitwidth of the pointer type. Use this to
disallow narrower types for G_PTRMASK.

Diff Detail

Event Timeline

arsenm created this revision.Jul 22 2020, 8:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 22 2020, 8:47 AM
aemerson added inline comments.Jul 23 2020, 2:41 PM
llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
883

This isn't used?

arsenm updated this revision to Diff 280265.Jul 23 2020, 2:55 PM

Remove leftover, although it probably should be there for consistency

aemerson accepted this revision.Jul 23 2020, 5:00 PM
This revision is now accepted and ready to land.Jul 23 2020, 5:00 PM