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

Vikash Gupta via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 08:31:25 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 ***
----------------
vg0204 wrote:

> You need to check each individual failure message

All three are different examples with same issue. Want to do that, Just don't know how to do so within same file! Don't know if putting each function in separate file is worth it!

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


More information about the llvm-commits mailing list