<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 22, 2017 at 9:08 AM, Karl-Johan Karlsson via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Is it a fault that DesA.Scev is not of pointer type?</blockquote></div><div class="gmail_extra"><br></div>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 <a href="http://llvm.org/docs/doxygen/html/ScalarEvolutionExpressions_8h_source.html#l00217">comment </a>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:</div><div class="gmail_extra"><br></div><div class="gmail_extra">```</div><div class="gmail_extra">if(getPointerOperand(A)->getType()->getPointerAddressSpace() !=</div><div class="gmail_extra">   getPointerOperand(B)->getType()->getPointerAddressSpace())</div><div class="gmail_extra">  continue;</div><div class="gmail_extra">```</div><div class="gmail_extra"><div class="gmail_extra"><br></div></div><div class="gmail_extra"><br><br></div></div>