This is an archive of the discontinued LLVM Phabricator instance.

LegalizeDAG: Use correct ptr type when expanding unaligned load/store
ClosedPublic

Authored by arsenm on Feb 17 2016, 10:30 AM.

Details

Reviewers
ab
Summary

This fixes regressions exposed in existing AMDGPU tests in a
future commit when all loads are custom lowered.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 48214.Feb 17 2016, 10:30 AM
arsenm retitled this revision from to LegalizeDAG: Use correct ptr type when expanding unaligned load/store.
arsenm updated this object.
arsenm added a subscriber: llvm-commits.
arsenm updated this revision to Diff 48217.Feb 17 2016, 10:50 AM

Missed a spot

ab added a subscriber: ab.Feb 17 2016, 11:12 AM

If I understand correctly, ExpandUnalignedStore was correct and the changes are NFC, but ExpandUnalignedLoad wasn't, right?

If so, LGTM.

Otherwise I'm not sure I understand why TLI.getPointerTy(DL, AS) isn't sufficient.

In D17341#354906, @ab wrote:

If I understand correctly, ExpandUnalignedStore was correct and the changes are NFC, but ExpandUnalignedLoad wasn't, right?

If so, LGTM.

Otherwise I'm not sure I understand why TLI.getPointerTy(DL, AS) isn't sufficient.

No, both have the same problem.

I think it's cleaner to get the existing type rather than re-figuring it out from the address space.

ab accepted this revision.Feb 29 2016, 11:43 AM
ab added a reviewer: ab.

LGTM.

In D17341#354906, @ab wrote:

If I understand correctly, ExpandUnalignedStore was correct and the changes are NFC, but ExpandUnalignedLoad wasn't, right?

If so, LGTM.

Otherwise I'm not sure I understand why TLI.getPointerTy(DL, AS) isn't sufficient.

No, both have the same problem.

I had a closer look; I see that in ExpandUnalignedStore, there's a problem when StackPtrVT and PtrVT are different.

I think it's cleaner to get the existing type rather than re-figuring it out from the address space.

Agreed.

This revision is now accepted and ready to land.Feb 29 2016, 11:43 AM
arsenm closed this revision.Feb 29 2016, 9:18 PM

r262299