[PATCH] D22867: [LV] Mark scalarized GEPs uniform

Wei Mi via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 10:34:39 PDT 2016


wmi added inline comments.

================
Comment at: test/Transforms/LoopVectorize/induction.ll:295
@@ -251,1 +294,3 @@
+}
+
 ; Make sure that the loop exit count computation does not overflow for i8 and
----------------
Hi Matthew,

A problem I see to make getelementptr as uniform when it is non-consecutive is:

For the testcase here, if we don't enable interleave memory access, 
we will generate vectorized version for "%0 = shl nsw i64 %i, 2". However with your patch "%0 = shl nsw i64 %i, 2" will also be marked as uniform because "%1 = getelementptr inbounds i32, i32* %a, i64 %0" is marked as uniform. These are contradicted results.

Even if we generate scalarized version for "%0 = shl nsw i64 %i, 2", the instruction cost for "%0 = shl nsw i64 %i, 2" should be VF. Marking it as uniform will lower its cost estimation to be only 1.    

Thanks,
Wei.




https://reviews.llvm.org/D22867





More information about the llvm-commits mailing list