[llvm-commits] [llvm] r102906 - /llvm/trunk/lib/Target/README.txt

Dan Gohman gohman at apple.com
Mon May 3 07:31:00 PDT 2010


Author: djg
Date: Mon May  3 09:31:00 2010
New Revision: 102906

URL: http://llvm.org/viewvc/llvm-project?rev=102906&view=rev
Log:
Add a README entry.

Modified:
    llvm/trunk/lib/Target/README.txt

Modified: llvm/trunk/lib/Target/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/README.txt?rev=102906&r1=102905&r2=102906&view=diff
==============================================================================
--- llvm/trunk/lib/Target/README.txt (original)
+++ llvm/trunk/lib/Target/README.txt Mon May  3 09:31:00 2010
@@ -1835,3 +1835,16 @@
 
 //===---------------------------------------------------------------------===//
 
+In this code:
+
+long foo(long x) {
+  return x > 1 ? x : 1;
+}
+
+LLVM emits a comparison with 1 instead of 0. 0 would be equivalent
+and cheaper on most targets.
+
+LLVM prefers comparisons with zero over non-zero in general, but in this
+case it choses instead to keep the max operation obvious.
+
+//===---------------------------------------------------------------------===//





More information about the llvm-commits mailing list