[PATCH] D18940: Loop vectorization with uniform load
Ayal Zaks via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 10 04:54:00 PDT 2016
Ayal added a comment.
This seems like the right cost to attribute to a uniform load.
In general, as in this testcase, uniform loads that are loop-invariant better be hoisted before the vectorizer, yielding potentially even lower costs. But that's an orthogonal issue.
It would be good to align the instructions emitted when vectorizing such a load (i.e., scalarizeInstruction's insertElements) with this cost attributed to it.
================
Comment at: ../test/Transforms/LoopVectorize/X86/uniform_load.ll:1
@@ +1,2 @@
+; RUN: opt -O2 -S -mcpu=core-avx2 < %s | FileCheck %s
+
----------------
Suffice to invoke -loop-vectorize rather than -O2?
Repository:
rL LLVM
http://reviews.llvm.org/D18940
More information about the llvm-commits
mailing list