[llvm] [AMDGPU] Add MachineVerifer check to detect illegal copies from VGPR to SGPR (PR #105494)
Aditi Medhane via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 04:34:28 PDT 2024
================
@@ -0,0 +1,30 @@
+# RUN: not --crash llc -mtriple=amdgcn -mcpu=gfx900 -verify-machineinstrs -run-pass=si-fix-sgpr-copies -o - %s 2>&1 | FileCheck -check-prefix=GCN %s
+
----------------
AditiRM wrote:
In this specific testcase(phi-vgpr-input-moveimm.mir) it is throwing illegal copy error as expected, and it is because isSSA considers subreg defs invalid in SSA. So I have extracted the specific subtest & converted it into not crash. Please let me know if this is valid.
Reference : https://github.com/llvm/llvm-project/blob/main/llvm/lib/CodeGen/MIRParser/MIRParser.cpp#L361
https://github.com/llvm/llvm-project/pull/105494
More information about the llvm-commits
mailing list