[llvm] [AMDGPU] Fixed verifier crash because of multiple live range components. (PR #190719)

Dhruva Chakrabarti via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 7 12:11:57 PDT 2026


================
@@ -0,0 +1,146 @@
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -O3 \
+; RUN:   -amdgpu-use-amdgpu-trackers=1 --lsr-drop-solution=1 \
+; RUN:   -enable-post-misched=0 -verify-machineinstrs -o - %s 2>&1 | FileCheck %s
+; CHECK-NOT: Bad machine code: Multiple connected components in live interval
+
+; This test verifies that multiple connected live range components are not
+; created by the VGPR-to-AGPR MFMA rewrite pass. If multiple components exist,
+; the verifier would error out.
+
+define amdgpu_kernel void @multi_store_spill_slot() #0 {
----------------
dhruvachak wrote:

It seems hard to get an MIR test. I tried starting directly from the rewrite pass but VirtRegMap is empty, so the pass exits early. I tried starting from before RA but then different register allocation decisions don't trigger the bug. 

I was able to trim the options required for the bug and stop after the rewrite.

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


More information about the llvm-commits mailing list