From 79997a24d750f3732f071ddc10c86d072b8cf735 Mon Sep 17 00:00:00 2001 From: Wei Mi Date: Tue, 19 Jul 2016 00:50:43 +0000 Subject: 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 --- .../Transforms/LoopVectorize/reverse_induction.ll | 27 +++++++++++++++------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'llvm/test/Transforms/LoopVectorize/reverse_induction.ll') 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> [ , %vector.ph ] -; CHECK: %step.add = add <4 x i64> %vec.ind, -; 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> [ , %vector.ph ] -; CHECK: %step.add = add <4 x i64> %vec.ind, +; 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: -- cgit v1.2.3