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. George -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110521/f78423a7/attachment.html>
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