Add a README entry.
authorDan Gohman <gohman@apple.com>
Mon, 3 May 2010 14:31:00 +0000 (14:31 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 3 May 2010 14:31:00 +0000 (14:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102906 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/README.txt

index acf36b84824f787246eb38d20b9632b355f28283..144bf5d3e3dc6976c98344106c862f60fb4c2076 100644 (file)
@@ -1835,3 +1835,16 @@ See GCC PR34949
 
 //===---------------------------------------------------------------------===//
 
+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.
+
+//===---------------------------------------------------------------------===//