[PATCH] D158397: [test] Add -verify-coalescing to testcase and fix problems with it
Mikael Holmén via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 21 22:21:11 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd1e685df45dc: [test] Add -verify-coalescing to testcase and fix problems (authored by uabelho).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158397/new/
https://reviews.llvm.org/D158397
Files:
llvm/test/CodeGen/Mips/coalesce-partial-redundant-reguse-terminator.mir
Index: llvm/test/CodeGen/Mips/coalesce-partial-redundant-reguse-terminator.mir
===================================================================
--- llvm/test/CodeGen/Mips/coalesce-partial-redundant-reguse-terminator.mir
+++ llvm/test/CodeGen/Mips/coalesce-partial-redundant-reguse-terminator.mir
@@ -1,41 +1,36 @@
-# RUN: llc -march=mips64 -o - %s -run-pass=register-coalescer | FileCheck %s
+# RUN: llc -march=mips64 -o - %s -run-pass=register-coalescer -verify-coalescing | FileCheck %s
---
name: f
tracksRegLiveness: true
body: |
bb.0:
- successors: %bb.1
-
- %21:gpr32 = ADDiu $zero, 0
- %22:gpr32 = COPY %21
- %22:gpr32 = ADDiu %22, 1
+ %0:gpr32 = ADDiu $zero, 0
+ %1:gpr32 = COPY %0
+ %1:gpr32 = ADDiu %1, 1
+ BEQ %0, $zero, %bb.3, implicit-def $at
J %bb.1, implicit-def dead $at
bb.1:
- successors: %bb.2
-
- BEQ %22, $zero, %bb.2, implicit-def $at
+ J %bb.2, implicit %1, implicit-def dead $at
bb.2:
- successors: %bb.2, %bb.3
-
- %22:gpr32 = COPY %21
- %21:gpr32 = COPY %22
- BEQ undef %0:gpr32, $zero, %bb.2, implicit-def $at
+ %1:gpr32 = COPY %0
+ %0:gpr32 = COPY %1
+ BEQ %0:gpr32, $zero, %bb.2, implicit-def $at
bb.3:
-
+ %4:gpr32 = ADDiu %1, 1
...
# We should not hoist the
#
-# %22:gpr32 = COPY %21
+# %1:gpr32 = COPY %0
#
-# into bb.1 since %22 is used in the BEQ.
+# into bb.1 since %1 is used in the terminating instruction J there.
# CHECK-LABEL: bb.1:
# CHECK-NOT: COPY
-# CHECK: BEQ
+# CHECK: J
# CHECK-LABEL: bb.2:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158397.552215.patch
Type: text/x-patch
Size: 1583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230822/6ef95d44/attachment.bin>
More information about the llvm-commits
mailing list