diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-05-23 22:16:45 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-05-23 22:16:45 +0000 |
commit | aa83c47bab636a2bd378f614f6958fe8a58eed8b (patch) | |
tree | 9b252b57e45e9c1dfd470e4876c036dc509e9304 /llvm/test | |
parent | 90770c7c76574b72c5807c5af87bfc6bec7078d4 (diff) | |
download | bcm5719-llvm-aa83c47bab636a2bd378f614f6958fe8a58eed8b.tar.gz bcm5719-llvm-aa83c47bab636a2bd378f614f6958fe8a58eed8b.zip |
[IRCE] Optimize "uses" not branches; NFCI
This changes IRCE to optimize uses, and not branches. This change is
NFCI since the uses we do inspect are in practice only ever going to be
the condition use in conditional branches; but this flexibility will
later allow us to analyze more complex expressions than just a direct
branch on a range check.
llvm-svn: 270500
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/Transforms/IRCE/only-lower-check.ll | 2 | ||||
-rw-r--r-- | llvm/test/Transforms/IRCE/only-upper-check.ll | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/Transforms/IRCE/only-lower-check.ll b/llvm/test/Transforms/IRCE/only-lower-check.ll index 69abc89c1a6..428c3aabdec 100644 --- a/llvm/test/Transforms/IRCE/only-lower-check.ll +++ b/llvm/test/Transforms/IRCE/only-lower-check.ll @@ -4,7 +4,7 @@ ; CHECK-NEXT: InductiveRangeCheck: ; CHECK-NEXT: Kind: RANGE_CHECK_LOWER ; CHECK-NEXT: Offset: (-1 + %n) Scale: -1 Length: (null) -; CHECK-NEXT: Branch: br i1 %abc, label %in.bounds, label %out.of.bounds +; CHECK-NEXT: CheckUse: br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1 Operand: 0 ; CHECK-NEXT: irce: in function only_lower_check: constrained Loop at depth 1 containing: %loop<header><exiting>,%in.bounds<latch><exiting> define void @only_lower_check(i32 *%arr, i32 *%a_len_ptr, i32 %n) { diff --git a/llvm/test/Transforms/IRCE/only-upper-check.ll b/llvm/test/Transforms/IRCE/only-upper-check.ll index dda3f3f6dd8..8e3e1ffe99b 100644 --- a/llvm/test/Transforms/IRCE/only-upper-check.ll +++ b/llvm/test/Transforms/IRCE/only-upper-check.ll @@ -4,7 +4,7 @@ ; CHECK-NEXT:InductiveRangeCheck: ; CHECK-NEXT: Kind: RANGE_CHECK_UPPER ; CHECK-NEXT: Offset: %offset Scale: 1 Length: %len = load i32, i32* %a_len_ptr, !range !0 -; CHECK-NEXT: Branch: br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1 +; CHECK-NEXT: CheckUse: br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1 Operand: 0 ; CHECK-NEXT: irce: in function incrementing: constrained Loop at depth 1 containing: %loop<header><exiting>,%in.bounds<latch><exiting> define void @incrementing(i32 *%arr, i32 *%a_len_ptr, i32 %n, i32 %offset) { |