summaryrefslogtreecommitdiff
path: root/lib/Target/README.txt
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-03-27 22:03:19 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-03-27 22:03:19 +0000
commitc8591a451a41627f2db13ac849f2b00272b7a898 (patch)
tree98990a39ce0360d1de50af0a0e4893bc44b798e5 /lib/Target/README.txt
parent66e30f8db180bdc0fba637c84e7b72396a08d8f2 (diff)
Add two missed instcombines related to compares with nsw arithmetic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153542 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/README.txt')
-rw-r--r--lib/Target/README.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt
index 1f69ffb09c0..2d4925d307a 100644
--- a/lib/Target/README.txt
+++ b/lib/Target/README.txt
@@ -961,6 +961,18 @@ optimized with "clang -emit-llvm-bc | opt -std-compile-opts".
//===---------------------------------------------------------------------===//
+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