summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commitf0901459b9366e9ca9fbd44891085a07fe4d8cef (patch)
treefa9d55fec79f1f183dfeee4703d272deea10dc1f /llvm/lib
parentbf70ee97b106d2fff908f7772cb36b6388817800 (diff)
downloadbcm5719-llvm-f0901459b9366e9ca9fbd44891085a07fe4d8cef.tar.gz
bcm5719-llvm-f0901459b9366e9ca9fbd44891085a07fe4d8cef.zip
Add two missed instcombines related to compares with nsw arithmetic.
llvm-svn: 153542
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/README.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Target/README.txt b/llvm/lib/Target/README.txt
index 1f69ffb09c0..2d4925d307a 100644
--- a/llvm/lib/Target/README.txt
+++ b/llvm/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
OpenPOWER on IntegriCloud