[PATCH] D20474: when calculating RegUsages, ignore instructions which are uniformed after vectorization
Wei Mi via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 17:45:12 PDT 2016
wmi 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
----------------
mkuper wrote:
> 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?
Ah, you are right. I misunderstood what uniform means here. Will fix it.
Repository:
rL LLVM
http://reviews.llvm.org/D20474
More information about the llvm-commits
mailing list