[LLVMdev] clarification question

Eli Friedman eli.friedman at gmail.com
Sat May 21 12:09:19 PDT 2011


On Sat, May 21, 2011 at 12:03 PM, George Baah <georgebaah at gmail.com> wrote:
> Hi,
>   The llvm doc says that for a compare instruction the operands must have
> identical types.
> I am wondering whether that means we can't compare an int64 to an int32 or
> does does it
> mean both operands should be integer types? Thanks.

Identical means identical; if you need to compare integers of
different widths, insert a zext or sext as appropriate.

-Eli




More information about the llvm-dev mailing list