[llvm] [AMDGPU][LIT][NFC] Added test for live-in CSR SGPR used partially giving MachineVerifier error (PR #126696)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 03:57:23 PST 2025


================
@@ -0,0 +1,51 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: not --crash llc -mtriple=amdgcn-amd-amdhsa -verify-machineinstrs -run-pass=si-lower-sgpr-spills %s -o /dev/null 2>&1 | FileCheck -check-prefix=VERIFIER %s
+
+# FIXME : Currently, MRI's liveIn check for registers does not take the corresponding live-in's sub-registers into account. As a result
+# in SILowerSGPRSpills, the SubReg spill gets marked KILLED even though its SuperReg is in the function Live-ins. This causes machine
+# verifier to now fail at direct usage of that SubReg, which intially should not be any problem before adding spill.
+
+# VERIFIER: *** Bad machine code: Using an undefined physical register ***
----------------
arsenm wrote:

You need to check each individual failure message. As-is, I don't think this stresses all 3 functions. The verifier aborts after the first failing function 

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


More information about the llvm-commits mailing list