[PATCH] D21330: Loop vectorization with FP induction variables

Elena Demikhovsky via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 05:47:49 PDT 2016


delena added inline comments.

================
Comment at: ../include/llvm/Transforms/Utils/LoopUtils.h:355
@@ -320,1 +354,3 @@
   const SCEV *Step;
+  // Instruction that advances induction variable
+  BinaryOperator *InductionBinOp;
----------------
anemet wrote:
> Comments are full sentences, please end with a period.
ok.

================
Comment at: ../test/Transforms/LoopVectorize/float-induction.ll:4
@@ +3,3 @@
+; RUN: opt < %s  -loop-vectorize -force-vector-interleave=2 -force-vector-width=1 -dce -instcombine -S | FileCheck --check-prefix VEC1_INTERL2 %s
+; RUN: opt < %s  -O3 -mcpu=core-avx2 -mtriple=x86_64-unknown-linux-gnu -S | FileCheck --check-prefix AUTO_VEC %s
+
----------------
anemet wrote:
> I *think* you can only have this under LoopVectorize/X86 (what if the X86 backend is not enabled in a build?).  But more importantly, I don't understand why you need to formulate the non-fast-math case as an x86 test.
The "unsafe" function attribute works only for auto-vec. If you specify -force-vector-width=4 the loop will be vectorized anyway. So I added "X86" tests just to check combination of function attribute and "safe" FP induction in the auto-vectorization mode.


Repository:
  rL LLVM

https://reviews.llvm.org/D21330





More information about the llvm-commits mailing list