[llvm] [AMDGPU][NFC] Fix crash due to assertion failure (PR #123627)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 20 07:12:02 PST 2025


================
@@ -858,9 +858,12 @@ int GCNHazardRecognizer::createsVALUHazard(const MachineInstr &MI) {
   }
 
   if (TII->isFLAT(MI)) {
-    int DataIdx = AMDGPU::getNamedOperandIdx(Opcode, AMDGPU::OpName::vdata);
-    if (AMDGPU::getRegBitWidth(Desc.operands()[DataIdx].RegClass) > 64)
-      return DataIdx;
+    // There is no hazard if the instruction does not use vector regs
----------------
arsenm wrote:

Also needs a mir test 

https://github.com/llvm/llvm-project/pull/123627


More information about the llvm-commits mailing list