[llvm] 5cfc7b3 - [PowerPC] Add test after #75271 on PPC. NFC. (#75616)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 25 08:22:00 PST 2023


Author: Kai Luo
Date: 2023-12-26T00:21:56+08:00
New Revision: 5cfc7b3342ce4de0bbe182b38baa8a71fc83f8f8

URL: https://github.com/llvm/llvm-project/commit/5cfc7b3342ce4de0bbe182b38baa8a71fc83f8f8
DIFF: https://github.com/llvm/llvm-project/commit/5cfc7b3342ce4de0bbe182b38baa8a71fc83f8f8.diff

LOG: [PowerPC] Add test after #75271 on PPC. NFC. (#75616)

Demonstrate `IMPLICIT_DEF implicit-def ...` can be generated after
coalescing on PPC.

The case is reduced from failure in #75570. The failure is triggered
after #75271 .

Added: 
    llvm/test/CodeGen/PowerPC/coalescer-remat-with-undef-implicit-def-operand.mir

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/PowerPC/coalescer-remat-with-undef-implicit-def-operand.mir b/llvm/test/CodeGen/PowerPC/coalescer-remat-with-undef-implicit-def-operand.mir
new file mode 100644
index 00000000000000..8e4e3be55600fc
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/coalescer-remat-with-undef-implicit-def-operand.mir
@@ -0,0 +1,28 @@
+# RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -verify-coalescing -run-pass=register-coalescer \
+# RUN:   -o - %s | FileCheck %s
+---
+name:            _Z13testTransposeIfLj31ELj17EEvv
+alignment:       16
+tracksRegLiveness: true
+frameInfo:
+  maxAlignment:    128
+machineFunctionInfo: {}
+body:             |
+  ; CHECK-LABEL: name:            _Z13testTransposeIfLj31ELj17EEvv
+  ; CHECK: undef %[[REG:[0-9]+]].sub_64:vsrc = IMPLICIT_DEF implicit-def %[[REG]]
+  bb.0:
+    liveins: $x2
+    %2:vssrc = IMPLICIT_DEF
+    B %bb.2
+
+  bb.1:
+    %0:vsrc = SUBREG_TO_REG 1, killed %2, %subreg.sub_64
+    %1:vsrc = XXPERMDI killed undef %0, killed %0, 0
+    BLR8 implicit $lr8, implicit $rm
+
+  bb.2:
+    successors: %bb.2(0x7c000000), %bb.1(0x04000000)
+    BDNZ8 %bb.2, implicit-def $ctr8, implicit $ctr8
+    B %bb.1
+
+...


        


More information about the llvm-commits mailing list