This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Use LLT in memory legality queries
ClosedPublic

Authored by arsenm on Jun 9 2021, 5:42 PM.

Details

Summary

This enables proper lowering of non-byte sized loads. We still aren't
faithfully preserving memory types everywhere, so the legality checks
still only consider the size.

Diff Detail

Event Timeline

arsenm created this revision.Jun 9 2021, 5:42 PM
arsenm requested review of this revision.Jun 9 2021, 5:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2021, 5:42 PM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm updated this revision to Diff 351020.Jun 9 2021, 5:49 PM

Re-enable some commented out tests that work now

Why did the AArch64 tests change?

llvm/lib/Target/ARM/ARMInstructionSelector.cpp
1099–1116

?

Why did the AArch64 tests change?

Because this wasn't properly handling non-byte accesses. The current DAG behavior is to zero the high bits on store, and insert AssertZext on load. When the legalizer handles this, it makes the special case s1 handling in the selector dead (the selector won't even see an s1 memory type)

aemerson accepted this revision.Jun 30 2021, 2:38 PM

Ok, LGTM.

This revision is now accepted and ready to land.Jun 30 2021, 2:38 PM