[llvm] [AMDGPU] Save/Restore SCC bit across waterfall loop. (PR #68363)
Sirish Pande via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 12 08:16:15 PDT 2023
================
@@ -5094,6 +5094,39 @@ unsigned SIInstrInfo::getVALUOp(const MachineInstr &MI) const {
"Unexpected scalar opcode without corresponding vector one!");
}
+bool SIInstrInfo::isSCCDefinedBefore(MachineBasicBlock &MBB,
+ MachineBasicBlock::iterator Before) const {
+
+ for (MachineBasicBlock::iterator I = Before, B = MBB.begin(); I != B; --I) {
+ MachineInstr &MI = *I;
+ if (!MI.hasImplicitDef())
----------------
srpande wrote:
With `computeRegisterLiveness(Reg)`, this change won't be necessary.
https://github.com/llvm/llvm-project/pull/68363
More information about the llvm-commits
mailing list