Add an example to the trunc instruction to clarify trunc to bool.
authorReid Spencer <rspencer@reidspencer.com>
Fri, 5 Jan 2007 21:33:08 +0000 (21:33 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Fri, 5 Jan 2007 21:33:08 +0000 (21:33 +0000)
Example provided by Baptiste Lepilleur.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32931 91177308-0d34-0410-b5e6-96231b3b80d8

docs/LangRef.html

index 5e030305b5efd7eb78902c44cc9712f40a079a8f..0c004e48251497d993559f5de6ab2ca6ef663259 100644 (file)
@@ -2701,6 +2701,7 @@ It will always truncate bits.</p>
 <pre>
   %X = trunc i32 257 to i8              <i>; yields i8:1</i>
   %Y = trunc i32 123 to bool               <i>; yields bool:true</i>
+  %Y = trunc i32 122 to bool               <i>; yields bool:false</i>
 </pre>
 </div>