[PATCH] D20474: when calculating RegUsages, ignore instructions which are uniformed after vectorization
Michael Kuperstein via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 16:43:27 PDT 2016
mkuper added inline comments.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:4919
@@ -4906,1 +4918,3 @@
+ // Also add all consecutive pointer values and all nonconsecutive pointer
+ // values if gather/scatter is not supported; these values will be uniform
// after vectorization (and subsequent cleanup) and, until revectorization is
----------------
Are you sure about this?
Nonconsecutive pointer values when there is no gather/scatter will be scalarized, but they aren't uniform.
So I'm not sure we should be counting them as uniform. This will work correctly for your new use of isUniformAfterVectorization() (since we really don't need vector registers in either case). But I think it may do the wrong thing for the existing use, in getInstructionCost(). We shouldn't be evaluating the cost of non-consecutive loads/stores as if they are a single scalar load/store.
Am I confused?
Repository:
rL LLVM
http://reviews.llvm.org/D20474
More information about the llvm-commits
mailing list