[PATCH] D118975: [AMDGPU] Allow hoisting of some VALU compare instructions
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 4 11:30:57 PST 2022
rampitec added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:133
static bool readsExecAsData(const MachineInstr &MI) {
+ if (MI.isCompare()) {
----------------
The function probably needs a different name now.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:134
static bool readsExecAsData(const MachineInstr &MI) {
- if (MI.isCompare())
- return true;
+ if (MI.isCompare()) {
+ const MachineRegisterInfo &MRI = MI.getParent()->getParent()->getRegInfo();
----------------
This needs a comment.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:136
+ const MachineRegisterInfo &MRI = MI.getParent()->getParent()->getRegInfo();
+ Register DstReg = MI.getOperand(0).getReg();
+ for (MachineInstr &Use : MRI.use_instructions(DstReg)) {
----------------
Check it is virtual.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118975/new/
https://reviews.llvm.org/D118975
More information about the llvm-commits
mailing list