[LLVMdev] ICmp documentation clarification
Baptiste Lepilleur
gaiacrtn at free.fr
Fri Jan 5 00:44:53 PST 2007
I just want to make sure I understand the semantic of the icmp function
correctly as assumption are dangerous in this domain.
The syntax is specified as follow:
<result> = icmp <cond> <ty> <var1>, <var2> ; yields {bool}:result
But I can not find the documentation for <ty>. Is the following
interpretation correct:
Both <var1> and <var2> are converted to <ty> using the semantic of the trunc
instruction before processing the comparison operation.
Concerning instruction trunc, is bool considered to be an alias to type i1.
If so, does the following stand true:
%Y = trunc i32 123 to bool ; yields bool:true%Y = trunc i32
122 to bool ; yields bool:falseBaptiste.
More information about the llvm-dev
mailing list