[PATCH] D128040: Add test case showing failure for MachineCopyPropagation. NFC

Han-Kuan Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 02:35:48 PDT 2022


HanKuanChen created this revision.
HanKuanChen added reviewers: craig.topper, adriantong1024, kito-cheng.
Herald added subscribers: luke957, StephenFan, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb.
Herald added a project: All.
HanKuanChen requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, MaskRay.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D128040

Files:
  llvm/test/CodeGen/RISCV/machine-cp.mir


Index: llvm/test/CodeGen/RISCV/machine-cp.mir
===================================================================
--- /dev/null
+++ llvm/test/CodeGen/RISCV/machine-cp.mir
@@ -0,0 +1,40 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -o - %s -mtriple=riscv32 -simplify-mir \
+# RUN:   -run-pass=machine-cp | FileCheck --check-prefix=RV32 %s
+# RUN: llc -o - %s -mtriple=riscv64 -simplify-mir \
+# RUN:   -run-pass=machine-cp | FileCheck --check-prefix=RV64 %s
+
+--- |
+  define void @foo() {
+  entry:
+    ret void
+  }
+...
+---
+name:            foo
+alignment:       2
+exposesReturnsTwice: false
+tracksRegLiveness: true
+registers:       []
+liveins:         []
+fixedStack:      []
+stack:
+body:             |
+  bb.0.entry:
+    liveins: $v28_v29_v30, $v8_v9, $v1
+    ; RV32-LABEL: name: foo
+    ; RV32: liveins: $v28_v29_v30, $v8_v9, $v1
+    ; RV32-NEXT: {{  $}}
+    ; RV32-NEXT: renamable $v4_v5_v6_v7_v8_v9_v10_v11 = COPY renamable $v0_v1_v2_v3_v4_v5_v6_v7
+    ; RV32-NEXT: PseudoRET
+    ; RV64-LABEL: name: foo
+    ; RV64: liveins: $v28_v29_v30, $v8_v9, $v1
+    ; RV64-NEXT: {{  $}}
+    ; RV64-NEXT: renamable $v4_v5_v6_v7_v8_v9_v10_v11 = COPY renamable $v0_v1_v2_v3_v4_v5_v6_v7
+    ; RV64-NEXT: PseudoRET
+    renamable $v8 = COPY renamable $v1, implicit killed $v8_v9, implicit-def $v8_v9
+    renamable $v4_v5_v6_v7_v8_v9_v10_v11 = COPY killed renamable $v0_v1_v2_v3_v4_v5_v6_v7
+    renamable $v28 = COPY renamable $v8, implicit killed $v28_v29_v30, implicit-def $v28_v29_v30
+    PseudoRET
+
+...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128040.437827.patch
Type: text/x-patch
Size: 1571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220617/8e950da9/attachment.bin>


More information about the llvm-commits mailing list