[PATCH] D51639: [LV] Fix PR38786 - consider first order recurrence phis non-uniform
Anna Thomas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 4 09:58:53 PDT 2018
anna added inline comments.
================
Comment at: test/Transforms/LoopVectorize/X86/uniform-phi.ll:90
+ %i32next = add i32 %phi32, 1
+ %i64next = zext i32 %i32next to i64
+ %xip = getelementptr inbounds double, double* %x, i64 %i64next
----------------
orivej wrote:
> Note: if I replace `%i64next = zext i32 %i32next to i64` with `%i64next = add i64 %phi64, 1` it ceases to be a first order recurrence, and the loop vectorizer considers `%phi32` and `%phi64` uniform and correctly optimizes this.
yes, that is expected :)
iv64next is a uniform IV user, so both the phis and their increments are considered uniforms. See the processing of uniforms for IV phis in the source code, just after the above fix.
Repository:
rL LLVM
https://reviews.llvm.org/D51639
More information about the llvm-commits
mailing list