From 342fb0db6d98d43252cbaeb6123cd154976c42aa Mon Sep 17 00:00:00 2001 From: Kang Zhang Date: Mon, 12 Aug 2019 13:15:31 +0000 Subject: [CodeGen] Do the Simple Early Return in block-placement pass to optimize the blocks Summary: In `block-placement` pass, it will create some patterns for unconditional we can do the simple early retrun. But the `early-ret` pass is before `block-placement`, we don't want to run it again. This patch is to do the simple early return to optimize the blocks at the last of `block-placement`. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D63972 llvm-svn: 368565 --- llvm/test/CodeGen/PowerPC/block-placement.mir | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'llvm/test') diff --git a/llvm/test/CodeGen/PowerPC/block-placement.mir b/llvm/test/CodeGen/PowerPC/block-placement.mir index 9406e13b354..e413e3db2d5 100644 --- a/llvm/test/CodeGen/PowerPC/block-placement.mir +++ b/llvm/test/CodeGen/PowerPC/block-placement.mir @@ -209,14 +209,10 @@ body: | BLR8 implicit $lr8, implicit $rm, implicit killed $x3 ; CHECK: bb.5.if.else.i: - ; CHECK: successors: %bb.11(0x80000000) - ; CHECK: B %bb.11 + ; CHECK-NEXT: renamable $x3 = LI8 1 + ; CHECK-NEXT: BLR8 implicit $lr8, implicit $rm, implicit killed $x3 ; CHECK: bb.8.while.body.i (align 4): - ; CHECK: successors: %bb.11(0x04000000), %bb.9(0x7c000000) - ; CHECK: BCC 76, killed renamable $cr0, %bb.11 - - ; CHECK: bb.11: - ; CHECK: renamable $x3 = LI8 1 - ; CHECK-NEXT: BLR8 implicit $lr8, implicit $rm, implicit killed $x3 + ; CHECK: successors: %bb.5(0x04000000), %bb.9(0x7c000000) + ; CHECK: BCC 76, killed renamable $cr0, %bb.5 ... -- cgit v1.2.3