mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-27 05:32:22 +00:00
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
This commit is contained in:
parent
66e30f8db1
commit
c8591a451a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user