diff options
author | Wei Mi <wmi@google.com> | 2016-07-19 00:50:43 +0000 |
---|---|---|
committer | Wei Mi <wmi@google.com> | 2016-07-19 00:50:43 +0000 |
commit | 79997a24d750f3732f071ddc10c86d072b8cf735 (patch) | |
tree | 9c561ace367d9f14c6b33b1ddc4c9ec7359824ea /llvm/test/Transforms/LoopVectorize/reverse_induction.ll | |
parent | fe358066eaea7db1a25a39b7dcf50cfaa7dd2c6d (diff) | |
download | bcm5719-llvm-79997a24d750f3732f071ddc10c86d072b8cf735.tar.gz bcm5719-llvm-79997a24d750f3732f071ddc10c86d072b8cf735.zip |
Recommit the patch "Use uniforms set to populate VecValuesToIgnore".
For instructions in uniform set, they will not have vector versions so
add them to VecValuesToIgnore.
For induction vars, those only used in uniform instructions or consecutive
ptrs instructions have already been added to VecValuesToIgnore above. For
those induction vars which are only used in uniform instructions or
non-consecutive/non-gather scatter ptr instructions, the related phi and
update will also be added into VecValuesToIgnore set.
The change will make the vector RegUsages estimation less conservative.
Differential Revision: https://reviews.llvm.org/D20474
The recommit fixed the testcase global_alias.ll.
llvm-svn: 275936
Diffstat (limited to 'llvm/test/Transforms/LoopVectorize/reverse_induction.ll')
-rw-r--r-- | llvm/test/Transforms/LoopVectorize/reverse_induction.ll | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/llvm/test/Transforms/LoopVectorize/reverse_induction.ll b/llvm/test/Transforms/LoopVectorize/reverse_induction.ll index 24ffb6167de..ae8f9b3390d 100644 --- a/llvm/test/Transforms/LoopVectorize/reverse_induction.ll +++ b/llvm/test/Transforms/LoopVectorize/reverse_induction.ll @@ -118,11 +118,16 @@ loopend: ; } ; CHECK-LABEL: @reverse_forward_induction_i64_i8( -; CHECK: vector.body ; CHECK: %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] -; CHECK: %vec.ind = phi <4 x i64> [ <i64 1023, i64 1022, i64 1021, i64 1020>, %vector.ph ] -; CHECK: %step.add = add <4 x i64> %vec.ind, <i64 -4, i64 -4, i64 -4, i64 -4> -; CHECK: trunc i64 %index to i8 +; CHECK: %offset.idx = sub i64 1023, %index +; CHECK: %[[a0:.+]] = add i64 %offset.idx, 0 +; CHECK: %[[a1:.+]] = add i64 %offset.idx, -1 +; CHECK: %[[a2:.+]] = add i64 %offset.idx, -2 +; CHECK: %[[a3:.+]] = add i64 %offset.idx, -3 +; CHECK: %[[a4:.+]] = add i64 %offset.idx, -4 +; CHECK: %[[a5:.+]] = add i64 %offset.idx, -5 +; CHECK: %[[a6:.+]] = add i64 %offset.idx, -6 +; CHECK: %[[a7:.+]] = add i64 %offset.idx, -7 define void @reverse_forward_induction_i64_i8() { entry: @@ -145,10 +150,16 @@ while.end: } ; CHECK-LABEL: @reverse_forward_induction_i64_i8_signed( -; CHECK: vector.body: -; CHECK: %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] -; CHECK: %vec.ind = phi <4 x i64> [ <i64 1023, i64 1022, i64 1021, i64 1020>, %vector.ph ] -; CHECK: %step.add = add <4 x i64> %vec.ind, <i64 -4, i64 -4, i64 -4, i64 -4> +; CHECK: %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] +; CHECK: %offset.idx = sub i64 1023, %index +; CHECK: %[[a0:.+]] = add i64 %offset.idx, 0 +; CHECK: %[[a1:.+]] = add i64 %offset.idx, -1 +; CHECK: %[[a2:.+]] = add i64 %offset.idx, -2 +; CHECK: %[[a3:.+]] = add i64 %offset.idx, -3 +; CHECK: %[[a4:.+]] = add i64 %offset.idx, -4 +; CHECK: %[[a5:.+]] = add i64 %offset.idx, -5 +; CHECK: %[[a6:.+]] = add i64 %offset.idx, -6 +; CHECK: %[[a7:.+]] = add i64 %offset.idx, -7 define void @reverse_forward_induction_i64_i8_signed() { entry: |