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

Michael Kuperstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 10:18:59 PST 2017


mkuper 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:
> 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...)


https://reviews.llvm.org/D29717





More information about the llvm-commits mailing list