[PATCH] D20315: [LV] For some induction variables, use vector phis instead of widening the scalar in the loop body
Elena Demikhovsky via llvm-commits
llvm-commits at lists.llvm.org
Tue May 31 10:33:37 PDT 2016
delena added a comment.
Some minor comments. Can you show IR before and after your change?
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:427
@@ +426,3 @@
+ /// Currently only works for integer primary induction variables with
+ /// a constant (non-SCEV) step.
+ /// If TruncType is provided, instead of widening the original IV, we
----------------
step is always a SCEV now. You mean step which is a constant SCEV.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:2118
@@ +2117,3 @@
+ ConstantInt *Step = II.getConstIntStepValue();
+
+ // Construct the initial value of the vector IV in the vector loop preheader
----------------
Check (Step != 0) here.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:4110
@@ +4109,3 @@
+ }
+ Value *Broadcasted = getBroadcastInstrs(V);
+ // After broadcasting the induction variable we need to make the vector
----------------
do we need this code if VF==1?
================
Comment at: test/Transforms/LoopVectorize/X86/gather_scatter.ll:98
@@ -97,3 +97,3 @@
;AVX512-LABEL: @foo2
-;AVX512: getelementptr %struct.In, %struct.In* %in, <16 x i64> %induction, i32 1
+;AVX512: getelementptr %struct.In, %struct.In* %in, <16 x i64> %vec.ind, i32 1
;AVX512: llvm.masked.gather.v16f32
----------------
I propose to remove variable name from this test.
http://reviews.llvm.org/D20315
More information about the llvm-commits
mailing list