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

Benjamin Kramer benny.kra at googlemail.com
Tue Mar 27 15:03:19 PDT 2012


Author: d0k
Date: Tue Mar 27 17:03:19 2012
New Revision: 153542

URL: http://llvm.org/viewvc/llvm-project?rev=153542&view=rev
Log:
Add two missed instcombines related to compares with nsw arithmetic.

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=153542&r1=153541&r2=153542&view=diff
==============================================================================
--- llvm/trunk/lib/Target/README.txt (original)
+++ llvm/trunk/lib/Target/README.txt Tue Mar 27 17:03:19 2012
@@ -961,6 +961,18 @@
 
 //===---------------------------------------------------------------------===//
 
+int g(int x) { return (x - 10) < 0; }
+Should combine to "x <= 9" (the sub has nsw).  Currently not
+optimized with "clang -emit-llvm-bc | opt -std-compile-opts".
+
+//===---------------------------------------------------------------------===//
+
+int g(int x) { return (x + 10) < 0; }
+Should combine to "x < -10" (the add has nsw).  Currently not
+optimized with "clang -emit-llvm-bc | opt -std-compile-opts".
+
+//===---------------------------------------------------------------------===//
+
 This was noticed in the entryblock for grokdeclarator in 403.gcc:
 
         %tmp = icmp eq i32 %decl_context, 4          





More information about the llvm-commits mailing list