[llvm] [AMDGPU] Simplify WaitcntBrackets::getRegInterval with getPhysRegBaseClass (PR #74087)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 5 03:25:23 PST 2023
================
@@ -525,7 +524,7 @@ RegInterval WaitcntBrackets::getRegInterval(const MachineInstr *MI,
else
return {-1, -1};
- const TargetRegisterClass *RC = TII->getOpRegClass(*MI, OpNo);
+ const TargetRegisterClass *RC = TRI->getPhysRegBaseClass(Op.getReg());
----------------
jayfoad wrote:
In practice I think this would have failed earlier, at the call to `TRI->getEncodingValue` above. Do you still think an explicit assert is needed somewhere?
https://github.com/llvm/llvm-project/pull/74087
More information about the llvm-commits
mailing list