[llvm] [PowerPC] Ensure MI peephole knows about instr modified by combineRLWINM() (PR #97134)

Chen Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 18:39:05 PDT 2024


================
@@ -0,0 +1,26 @@
+# RUN: llc -mtriple=powerpc-ibm-aix -verify-machineinstrs -run-pass=ppc-mi-peepholes -o - %s | FileCheck %s
+# RUN: llc -mtriple=powerpc64-ibm-aix -verify-machineinstrs -run-pass=ppc-mi-peepholes -o - %s | FileCheck %s
+# RUN: llc -mtriple=powerpc64-linux-gnu -verify-machineinstrs -run-pass=ppc-mi-peepholes -o - %s | FileCheck %s
+---
+
+name: testFoldRLWINM
+tracksRegLiveness: true
+
+body: |
+  bb.0.entry:
+    liveins: $r3
+    %0:gprc = COPY $r3
+    B %bb.1
+  bb.1:
+    B %bb.2
+  bb.2:
+    %1:gprc = RLWINM killed %0:gprc, 1, 0, 30
+    %2:gprc = RLWINM killed %1:gprc, 31, 0, 0
+    BLR8 implicit $lr8, implicit $rm
+
+...
+
+# CHECK:       bb.0.entry:
----------------
chenzheng1030 wrote:

nit: better to firstly check the label `testFoldRLWINM` in case we need to add more cases later in this file...

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


More information about the llvm-commits mailing list