diff options
| author | Guozhi Wei <carrot@google.com> | 2019-12-04 16:01:20 -0800 |
|---|---|---|
| committer | Guozhi Wei <carrot@google.com> | 2019-12-06 09:53:53 -0800 |
| commit | 72942459d070cbfe6f3524e89c3ac37440be7890 (patch) | |
| tree | 6a45cb456c8fff75ba7c89eb4156254ef6d485d8 /llvm/test/CodeGen/AArch64 | |
| parent | 164e0fc5c7f782b174db5c87b37725ea0e174853 (diff) | |
| download | bcm5719-llvm-72942459d070cbfe6f3524e89c3ac37440be7890.tar.gz bcm5719-llvm-72942459d070cbfe6f3524e89c3ac37440be7890.zip | |
[MBP] Avoid tail duplication if it can't bring benefit
Current tail duplication integrated in bb layout is designed to increase the fallthrough from a BB's predecessor to its successor, but we have observed cases that duplication doesn't increase fallthrough, or it brings too much size overhead.
To overcome these two issues in function canTailDuplicateUnplacedPreds I add two checks:
make sure there is at least one duplication in current work set.
the number of duplication should not exceed the number of successors.
The modification in hasBetterLayoutPredecessor fixes a bug that potential predecessor must be at the bottom of a chain.
Differential Revision: https://reviews.llvm.org/D64376
Diffstat (limited to 'llvm/test/CodeGen/AArch64')
| -rw-r--r-- | llvm/test/CodeGen/AArch64/callbr-asm-obj-file.ll | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/AArch64/swifterror.ll | 4 | ||||
| -rw-r--r-- | llvm/test/CodeGen/AArch64/tbz-tbnz.ll | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/AArch64/callbr-asm-obj-file.ll b/llvm/test/CodeGen/AArch64/callbr-asm-obj-file.ll index 58067946614..345c3f9c455 100644 --- a/llvm/test/CodeGen/AArch64/callbr-asm-obj-file.ll +++ b/llvm/test/CodeGen/AArch64/callbr-asm-obj-file.ll @@ -73,7 +73,7 @@ define hidden i32 @test2() local_unnamed_addr { ; CHECK-LABEL: test3: ; CHECK-LABEL: $d.9: ; CHECK-LABEL: $x.10: -; CHECK-NEXT: b #20 <$x.12+0x8> +; CHECK-NEXT: b #-20 <test3+0x18> ; CHECK-LABEL: $x.12: ; CHECK-NEXT: b #4 <$x.12+0x4> ; CHECK-NEXT: mov w0, wzr diff --git a/llvm/test/CodeGen/AArch64/swifterror.ll b/llvm/test/CodeGen/AArch64/swifterror.ll index 93529d1ee86..1eedb762043 100644 --- a/llvm/test/CodeGen/AArch64/swifterror.ll +++ b/llvm/test/CodeGen/AArch64/swifterror.ll @@ -168,12 +168,12 @@ normal: define float @foo_loop(%swift_error** swifterror %error_ptr_ref, i32 %cc, float %cc2) { ; CHECK-APPLE-LABEL: foo_loop: ; CHECK-APPLE: mov x0, x21 +; CHECK-APPLE: fcmp +; CHECK-APPLE: b.gt ; CHECK-APPLE: cbz ; CHECK-APPLE: mov w0, #16 ; CHECK-APPLE: malloc ; CHECK-APPLE: strb w{{.*}}, [x0, #8] -; CHECK-APPLE: fcmp -; CHECK-APPLE: b.le ; CHECK-APPLE: mov x21, x0 ; CHECK-APPLE: ret diff --git a/llvm/test/CodeGen/AArch64/tbz-tbnz.ll b/llvm/test/CodeGen/AArch64/tbz-tbnz.ll index 5d6b3903fbb..5018ce0b387 100644 --- a/llvm/test/CodeGen/AArch64/tbz-tbnz.ll +++ b/llvm/test/CodeGen/AArch64/tbz-tbnz.ll @@ -153,7 +153,7 @@ if.then2: br i1 %tst3, label %if.then3, label %if.end ; CHECK: tst x0, x1, lsl #63 -; CHECK: b.ge +; CHECK: b.lt if.then3: %shifted_op2 = shl i64 %val2, 62 |

