[PATCH] D11621: AMDGPU: Mark scalar loads as rematerializable

Piotr Sobczak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 06:22:38 PDT 2023


piotr accepted this revision as: piotr.
piotr added a comment.
This revision is now accepted and ready to land.

Yes - this is NFC, but paves the way for other changes.

I experimented with adding `isSMRD()` check in AMDGPU hook `SIInstrInfo::isReallyTriviallyReMaterializable` on top of D11621 <https://reviews.llvm.org/D11621>, and that resulted in some useful rematerialization.

However, it also resulted in some redundant registers being used because there is no mechanism to shrink the load to only load the part needed for current rematerialization context. So that needs to be added before we extend `SIInstrInfo::isReallyTriviallyReMaterializable` I think.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D11621/new/

https://reviews.llvm.org/D11621



More information about the llvm-commits mailing list