%0 = icmp eq i32 %y, 0 In the above instruction how can i know that the comparison is equality comparison?? --Rajwinder Singh -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100628/8d8e5cb1/attachment.html>
RAJWINDER SINGH wrote:> %0 = icmp eq i32 %y, 0 > In the above instruction how can i know that the comparison is equality > comparison??ICI->getPredicate() == ICmpInst::ICMP_EQ. See the doxygen for CmpInst: http://llvm.org/doxygen/classllvm_1_1CmpInst.html and ICmpInst: http://llvm.org/doxygen/classllvm_1_1ICmpInst.html . (Note that ICI->isEquality() returns true for both 'eq' and 'ne'.) Nick
The "eq" part means "equality". That's how you know which kind of comparison you're dealing with. You should read about the icmp instruction. Félix Le 2010-06-28 à 00:37:44, RAJWINDER SINGH a écrit :> %0 = icmp eq i32 %y, 0 > In the above instruction how can i know that the comparison is equality comparison?? > > --Rajwinder Singh > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100628/44454a73/attachment.html>