diff options
| author | Kang Zhang <shkzhang@cn.ibm.com> | 2019-08-12 13:15:31 +0000 |
|---|---|---|
| committer | Kang Zhang <shkzhang@cn.ibm.com> | 2019-08-12 13:15:31 +0000 |
| commit | 342fb0db6d98d43252cbaeb6123cd154976c42aa (patch) | |
| tree | dca9f9a765851e93bd2b5061b6388f686748e905 /llvm/test/CodeGen/PowerPC | |
| parent | 20b2cd3c0bfe8f732bb135edb7f3c8436d005fe9 (diff) | |
| download | bcm5719-llvm-342fb0db6d98d43252cbaeb6123cd154976c42aa.tar.gz bcm5719-llvm-342fb0db6d98d43252cbaeb6123cd154976c42aa.zip | |
[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
Diffstat (limited to 'llvm/test/CodeGen/PowerPC')
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/block-placement.mir | 12 |
1 files changed, 4 insertions, 8 deletions
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 ... |

