diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-02-21 22:07:32 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-02-21 22:07:32 +0000 |
commit | 7fc60da2f58fed58a60046e4da815646a6b83c61 (patch) | |
tree | bc91e2465cbdd4543a986531461573ef8aa34e74 /llvm/test/Transforms/IRCE/multiple-access-no-preloop.ll | |
parent | f07833057c012ca19d173f1e4990d8fa3ccda6cb (diff) | |
download | bcm5719-llvm-7fc60da2f58fed58a60046e4da815646a6b83c61.tar.gz bcm5719-llvm-7fc60da2f58fed58a60046e4da815646a6b83c61.zip |
IRCE: use SCEVs instead of llvm::Value's for intermediate
calculations. Semantically non-functional change.
This gets rid of some of the SCEV -> Value -> SCEV round tripping and
the Construct(SMin|SMax)Of and MaybeSimplify helper routines.
llvm-svn: 230150
Diffstat (limited to 'llvm/test/Transforms/IRCE/multiple-access-no-preloop.ll')
-rw-r--r-- | llvm/test/Transforms/IRCE/multiple-access-no-preloop.ll | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/llvm/test/Transforms/IRCE/multiple-access-no-preloop.ll b/llvm/test/Transforms/IRCE/multiple-access-no-preloop.ll index b8d2f140bab..1dfb70fe5e7 100644 --- a/llvm/test/Transforms/IRCE/multiple-access-no-preloop.ll +++ b/llvm/test/Transforms/IRCE/multiple-access-no-preloop.ll @@ -37,10 +37,14 @@ define void @multiple_access_no_preloop( ; CHECK-LABEL: multiple_access_no_preloop ; CHECK-LABEL: loop.preheader: -; CHECK: [[smaller_len_cmp:[^ ]+]] = icmp slt i32 %len.a, %len.b -; CHECK: [[smaller_len:[^ ]+]] = select i1 [[smaller_len_cmp]], i32 %len.a, i32 %len.b -; CHECK: [[upper_bound_cmp:[^ ]+]] = icmp slt i32 %n, %3 -; CHECK: [[upper_bound:[^ ]+]] = select i1 %5, i32 %n, i32 %3 +; CHECK: [[not_len_b:[^ ]+]] = sub i32 -1, %len.b +; CHECK: [[not_len_a:[^ ]+]] = sub i32 -1, %len.a +; CHECK: [[smax_not_len_cond:[^ ]+]] = icmp sgt i32 [[not_len_b]], [[not_len_a]] +; CHECK: [[smax_not_len:[^ ]+]] = select i1 [[smax_not_len_cond]], i32 [[not_len_b]], i32 [[not_len_a]] +; CHECK: [[not_n:[^ ]+]] = sub i32 -1, %n +; CHECK: [[not_upper_limit_cond:[^ ]+]] = icmp sgt i32 [[smax_not_len]], [[not_n]] +; CHECK: [[not_upper_limit:[^ ]+]] = select i1 [[not_upper_limit_cond]], i32 [[smax_not_len]], i32 [[not_n]] +; CHECK: [[upper_limit:[^ ]+]] = sub i32 -1, [[not_upper_limit]] ; CHECK-LABEL: loop: ; CHECK: br i1 true, label %in.bounds.a, label %out.of.bounds @@ -49,7 +53,7 @@ define void @multiple_access_no_preloop( ; CHECK: br i1 true, label %in.bounds.b, label %out.of.bounds ; CHECK-LABEL: in.bounds.b: -; CHECK: [[main_loop_cond:[^ ]+]] = icmp slt i32 %idx.next, [[upper_bound]] +; CHECK: [[main_loop_cond:[^ ]+]] = icmp slt i32 %idx.next, [[upper_limit]] ; CHECK: br i1 [[main_loop_cond]], label %loop, label %main.exit.selector ; CHECK-LABEL: in.bounds.b.postloop: |