[llvm] d1e685d - [test] Add -verify-coalescing to testcase and fix problems
Mikael Holmen via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 21 22:21:08 PDT 2023
Author: Mikael Holmen
Date: 2023-08-22T07:20:53+02:00
New Revision: d1e685df45dc5944b43d2547d0138cd4a3ee4efe
URL: https://github.com/llvm/llvm-project/commit/d1e685df45dc5944b43d2547d0138cd4a3ee4efe
DIFF: https://github.com/llvm/llvm-project/commit/d1e685df45dc5944b43d2547d0138cd4a3ee4efe.diff
LOG: [test] Add -verify-coalescing to testcase and fix problems
Apparently the testcase
coalesce-partial-redundant-reguse-terminator.mir
was broken in a way that -verify-coalescing detected.
Update the testcase so -verify-coalescing doesn't complain and so
that it still exposes the problem originally fixed in 6c062b7641623.
Differential Revision: https://reviews.llvm.org/D158397
Added:
Modified:
llvm/test/CodeGen/Mips/coalesce-partial-redundant-reguse-terminator.mir
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/Mips/coalesce-partial-redundant-reguse-terminator.mir b/llvm/test/CodeGen/Mips/coalesce-partial-redundant-reguse-terminator.mir
index d57c3edd480e27..bfdd5cfd8b53d4 100644
--- a/llvm/test/CodeGen/Mips/coalesce-partial-redundant-reguse-terminator.mir
+++ b/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:
More information about the llvm-commits
mailing list