[PATCH] D154083: [AMDGPU] Rematerialize scalar loads

Piotr Sobczak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 09:15:46 PDT 2023


piotr added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:2354
+    MI->getOperand(0).setIsUndef(false);
+    MRI.setRegClass(DestReg, &AMDGPU::SGPR_256RegClass);
+
----------------
arsenm wrote:
> arsenm wrote:
> > Can you go through getSubRegisterClass (possibly with getMatchingSuperRegClass and getSubClassWithSubReg) to avoid hardcoding this 
> Easier yet would be just use the result class from the instruction desc 
> 
> Also, is this safe from other users with a different class?
Thanks - will rewrite this, but what exactly do you mean here by "safe from other users"?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154083



More information about the llvm-commits mailing list