diff --git a/llvm/test/CodeGen/Mips/coalesce-partial-redundant-reguse-terminator.mir b/llvm/test/CodeGen/Mips/coalesce-partial-redundant-reguse-terminator.mir --- a/llvm/test/CodeGen/Mips/coalesce-partial-redundant-reguse-terminator.mir +++ b/llvm/test/CodeGen/Mips/coalesce-partial-redundant-reguse-terminator.mir @@ -1,40 +1,35 @@ -# 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-LABEL: bb.0: # CHECK-NOT: COPY # CHECK: BEQ