[AMDGPU] Add test case on crashing of `si-lower-sgpr-spills` pass
authorMichael Liao <michael.hliao@gmail.com>
Fri, 19 Jul 2019 18:50:53 +0000 (18:50 +0000)
committerMichael Liao <michael.hliao@gmail.com>
Fri, 19 Jul 2019 18:50:53 +0000 (18:50 +0000)
Reviewers: arsenm

Subscribers: qcolombet, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64273

llvm-svn: 366602

llvm/test/CodeGen/AMDGPU/si-lower-sgpr-spills.mir [new file with mode: 0644]

diff --git a/llvm/test/CodeGen/AMDGPU/si-lower-sgpr-spills.mir b/llvm/test/CodeGen/AMDGPU/si-lower-sgpr-spills.mir
new file mode 100644 (file)
index 0000000..5a022ef
--- /dev/null
@@ -0,0 +1,20 @@
+# RUN: llc -mtriple=amdgcn-amd-amdhsa -verify-machineinstrs -run-pass=si-lower-sgpr-spills -o - %s | FileCheck %s
+
+# CHECK-LABEL: name: empty_entry_block
+# CHECK: V_WRITELANE
+# CHECK-NEXT: V_WRITELANE
+# CHECK-NEXT: V_WRITELANE
+# CHECK-NEXT: V_WRITELANE
+# CHECK: V_READLANE
+# CHECK-NEXT: V_READLANE
+# CHECK-NEXT: V_READLANE
+# CHECK-NEXT: V_READLANE
+---
+name:            empty_entry_block
+body: |
+  bb.0:
+
+  bb.1:
+    renamable $sgpr36_sgpr37 = S_XOR_B64 renamable $vcc, -1, implicit-def dead $scc
+    $sgpr34_sgpr35 = S_AND_SAVEEXEC_B64 $sgpr36_sgpr37, implicit-def $exec, implicit-def $scc, implicit $exec
+    S_ENDPGM 0