This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Do not change register types in lowerLoad
ClosedPublic

Authored by arsenm on May 18 2021, 4:52 PM.

Details

Reviewers
aemerson
paquette
Summary

Adjusting the load register type is a widenScalar type action, not a
lowering. lowerLoad should be reserved for operations that change the
memory access size, such as unaligned load decomposition. With this
trying to adjust the register type, it was hard to avoid infinite
loops in the legalizer. Adds a bandaid to avoid regressing a few
AArch64 tests, but I'm not sure what the exact condition is and
there's probably a cleaner way to do this.

For AMDGPU this regresses handling of some cases for unaligned loads,
but the way this is currently working is a pretty ugly hack.

Diff Detail

Event Timeline

arsenm created this revision.May 18 2021, 4:52 PM
arsenm requested review of this revision.May 18 2021, 4:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2021, 4:52 PM
Herald added a subscriber: wdng. · View Herald Transcript
foad added a subscriber: foad.May 19 2021, 3:41 AM
aemerson accepted this revision.May 20 2021, 10:50 AM
aemerson added inline comments.
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
2719

This comment is now obsolete.

This revision is now accepted and ready to land.May 20 2021, 10:50 AM