[PATCH] D120813: AMDGPU: Skip folding REG_SEQUENCE if found unknown regclasses for its users.
Christudasan Devadasan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 4 06:14:53 PST 2022
cdevadas added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIFoldOperands.cpp:1602
unsigned OpIdx = Op - &UseMI->getOperand(0);
+ if (TII->isUnknownRegClass(*UseMI, OpIdx))
+ return false;
----------------
foad wrote:
> You could just use TargetInstrInfo::getRegClass(InstDesc, OpIdx, TRI, MF) instead of TRI->getRegClass and it would do all these checks for you already.
We can't use that equivalent of `getRegClass` here. The call to `adjustAllocatableRegClass` inside it would change AV classes to V thereby disabling the folding in almost all valid cases.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120813/new/
https://reviews.llvm.org/D120813
More information about the llvm-commits
mailing list