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

Karl-Johan Karlsson via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 22 07:21:48 PST 2017



On 2017-02-22 16:07, Matthew Simpson wrote:
>
> On Wed, Feb 22, 2017 at 9:08 AM, Karl-Johan Karlsson via llvm-commits
> <llvm-commits at lists.llvm.org <mailto: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:

Good!

>
> ```
> if(getPointerOperand(A)->getType()->getPointerAddressSpace() !=
>    getPointerOperand(B)->getType()->getPointerAddressSpace())
>   continue;
> ```

What go you think about this:

       if (getMemInstAddressSpace(A) != getMemInstAddressSpace(B))
         continue;

>
>
>


More information about the llvm-commits mailing list