[PATCH] D23854: [LoopAccessAnalysis] Recognize geps that include s/zexts as consecutive memory accesses.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 09:04:38 PDT 2016

mcrosier added a comment.

In https://reviews.llvm.org/D23854#528967, @bmakam wrote:

> In https://reviews.llvm.org/D23854#526264, @mssimpso wrote:
> > The logic looks fine, but I'm wondering if it makes sense to add this functionality directly into SCEV? It might be beneficial to transformations other than SLP and LoopIdiom. What do you think?
> Matt, I agree with you in principle but I do not have enough understanding of how SCEV works and after my first time reading through SCEV analysis I do not know how involved it is to add this functionality directly into SCEV.

I'm not opposed to leaving this as is (i.e., not enhancing SCEV).  My main goal was to remove the redundant code in the LoadStoreVectorizer.

Comment at: lib/Analysis/LoopAccessAnalysis.cpp:1112
@@ +1111,3 @@
+    APInt KnownOne(BitWidth, 0);
+    computeKnownBits(OpA, KnownZero, KnownOne, DL, 0, nullptr, OpA, DT);
+    KnownZero &= ~APInt::getHighBitsSet(BitWidth, 1);
bmakam wrote:
> I think it is very rare we ever reach this code. In my testing on spec2k* I did not find any instance.
Do you mean you added an assertion to make sure we never hit this code or that you didn't see any codegen changes for SPEC200X?


More information about the llvm-commits mailing list