<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Just for context, the change in the ICMP code was to support vectors of pointers. I think that we should use 'getScalarType()' before checking 'isPointerTy()'</div><div><br></div><div>Thanks,</div><div>Nadav</div><br><div><div>On Jan 15, 2013, at 10:44 AM, Evgeniy Stepanov <<a href="mailto:eugeni.stepanov@gmail.com">eugeni.stepanov@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p dir="ltr">No and no. One function of asserts is documenting the code, and this one was misleading and wrong.</p><p dir="ltr">Or did i misunderstood something? This difference between constructors was added in Nadav's change about a year ago, I assumed it's a mistake.</p>
<div class="gmail_quote">On Jan 15, 2013 9:47 PM, "David Blaikie" <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">
On Tue, Jan 15, 2013 at 7:30 AM, Evgeniy Stepanov<br>
<<a href="mailto:eugeni.stepanov@gmail.com">eugeni.stepanov@gmail.com</a>> wrote:<br>
> Author: eugenis<br>
> Date: Tue Jan 15 09:30:33 2013<br>
> New Revision: 172535<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=172535&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=172535&view=rev</a><br>
> Log:<br>
> Fix operand type conditions in one of ICmpInst constructors.<br>
><br>
> It was out of sync with the conditions in the other two constructors.<br>
<br>
Is there a case where this assert used to erroneously fire? Do you<br>
have a test case for that?<br>
<br>
><br>
> Modified:<br>
>     llvm/trunk/include/llvm/IR/Instructions.h<br>
><br>
> Modified: llvm/trunk/include/llvm/IR/Instructions.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Instructions.h?rev=172535&r1=172534&r2=172535&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Instructions.h?rev=172535&r1=172534&r2=172535&view=diff</a><br>

> ==============================================================================<br>
> --- llvm/trunk/include/llvm/IR/Instructions.h (original)<br>
> +++ llvm/trunk/include/llvm/IR/Instructions.h Tue Jan 15 09:30:33 2013<br>
> @@ -953,7 +953,7 @@<br>
>            "Both operands to ICmp instruction are not of the same type!");<br>
>      // Check that the operands are the right type<br>
>      assert((getOperand(0)->getType()->isIntOrIntVectorTy() ||<br>
> -            getOperand(0)->getType()->isPointerTy()) &&<br>
> +            getOperand(0)->getType()->getScalarType()->isPointerTy()) &&<br>
>             "Invalid operand types for ICmp instruction");<br>
>    }<br>
><br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>
</blockquote></div><br></body></html>