[PATCH] D29717: [LoopVectorize] Added address space check when analysing interleaved accesses

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 10:28:56 PST 2017


efriedma added inline comments.


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:5856
 
+      // Ignore A if the memory object of A and B don't belong to the same
+      // address space
----------------
mkuper wrote:
> mkuper wrote:
> > Hold on.
> > Shouldn't this fail the distance check? How can we have pointers in different address spaces where we succeed in computing the distance?
> Err, sorry, actually went ahead and read the bug. That was the wrong question to ask.
> 
> The right question:
> Do getMinusSCEV/getAddExpr require pointers to be in the same address space, as an API requirement? I mean, are they supposed to assert, or should they return something sane? Just trying to figure out whether this should be fixed on the caller side or the callee side.
> (This code is a good idea anyway, no point in wasting SCEV's time when we know we won't get a constant distance...)
SCEV getAddExpr doesn't actually check the address space explicitly, but the operation doesn't make sense unless all the operands have the same size.


https://reviews.llvm.org/D29717





More information about the llvm-commits mailing list