Patch by Ayal Zaks
Details
Details
- Reviewers
Ayal anna mssimpso hans silviu.baranga - Commits
- rGfbe05633b712: Merging r341416: --------------------------------------------------------------…
rGdbacea188b31: [LV] First order recurrence phis should not be treated as uniform
rL341523: Merging r341416:
rL341416: [LV] First order recurrence phis should not be treated as uniform
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Specify in the test comment that this is not about all phis, but only about first order recurrence phis.
test/Transforms/LoopVectorize/X86/uniform-phi.ll | ||
---|---|---|
90 | 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. |
test/Transforms/LoopVectorize/X86/uniform-phi.ll | ||
---|---|---|
90 | 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. |
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.