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

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 22 07:07:31 PST 2017


On Wed, Feb 22, 2017 at 9:08 AM, Karl-Johan Karlsson via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

>
> Is it a fault that DesA.Scev is not of pointer type?


After thinking a bit about this, we may be misusing SCEV::getType() here. I
haven't looked at your debug output very closely, but the comment
<http://llvm.org/docs/doxygen/html/ScalarEvolutionExpressions_8h_source.html#l00217>for
SCEVAddExpr indicates that operand order can make a difference. I suggest
that we get the pointer types directly from instructions rather than the
SCEVs:

```
if(getPointerOperand(A)->getType()->getPointerAddressSpace() !=
   getPointerOperand(B)->getType()->getPointerAddressSpace())
  continue;
```
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170222/4e97fbf8/attachment.html>


More information about the llvm-commits mailing list