[llvm-commits] [llvm] r172535 - /llvm/trunk/include/llvm/IR/Instructions.h

David Blaikie dblaikie at gmail.com
Tue Jan 15 09:47:49 PST 2013


On Tue, Jan 15, 2013 at 7:30 AM, Evgeniy Stepanov
<eugeni.stepanov at gmail.com> wrote:
> Author: eugenis
> Date: Tue Jan 15 09:30:33 2013
> New Revision: 172535
>
> URL: http://llvm.org/viewvc/llvm-project?rev=172535&view=rev
> Log:
> Fix operand type conditions in one of ICmpInst constructors.
>
> It was out of sync with the conditions in the other two constructors.

Is there a case where this assert used to erroneously fire? Do you
have a test case for that?

>
> Modified:
>     llvm/trunk/include/llvm/IR/Instructions.h
>
> Modified: llvm/trunk/include/llvm/IR/Instructions.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Instructions.h?rev=172535&r1=172534&r2=172535&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/IR/Instructions.h (original)
> +++ llvm/trunk/include/llvm/IR/Instructions.h Tue Jan 15 09:30:33 2013
> @@ -953,7 +953,7 @@
>            "Both operands to ICmp instruction are not of the same type!");
>      // Check that the operands are the right type
>      assert((getOperand(0)->getType()->isIntOrIntVectorTy() ||
> -            getOperand(0)->getType()->isPointerTy()) &&
> +            getOperand(0)->getType()->getScalarType()->isPointerTy()) &&
>             "Invalid operand types for ICmp instruction");
>    }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list