Page MenuHomePhabricator

AMDGPU: An extension to promote constant offset to the immediate
Needs ReviewPublic

Authored by cfang on Mar 26 2019, 11:16 AM.

Details

Reviewers
rampitec
arsenm
Summary

This is an extension to https://reviews.llvm.org/D55539 : promote constant offset to the immediate
to increase of the opportunity for loads.

Diff Detail

Event Timeline

cfang created this revision.Mar 26 2019, 11:16 AM
arsenm added inline comments.Mar 26 2019, 11:23 AM
lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
1230–1231

Where are the _e32 versions coming from? I don't think you should be seeing these at this point.

You would need to verify the carry out is dead here. You should add a testcase where the vcc def of the add is used

test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll
493

This shouldn't include a call

514–517

The test could be a lot simpler

cfang marked an inline comment as done.Mar 26 2019, 11:43 AM
cfang added inline comments.
lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
1230–1231

These _e32 version was generated in "SI Fold Operands". If you think should should not happen, we may need to fix that first.

arsenm added inline comments.Mar 26 2019, 1:52 PM
lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
1230–1231

This one is complicated. This still needs verification that the vcc use isn't needed

cfang marked 2 inline comments as done.Mar 29 2019, 3:03 PM
cfang added inline comments.
lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
1230–1231

Do you mean the add AMDGPU::V_ADD_I32_e32 will actually been removed?

This still needs verification that the vcc use isn't needed

How to do this verification?

test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll
493

Do you mean in general a LIT test shouldn't include a call, or just this test case? I saw a lot in the existing lit tests.