commit | ec7ee070369dd4074f7ad3ac4555ebb9421b8c1a | [log] [tgz] |
---|---|---|
author | David Majnemer <david.majnemer@gmail.com> | Thu Jul 31 04:49:18 2014 +0000 |
committer | David Majnemer <david.majnemer@gmail.com> | Thu Jul 31 04:49:18 2014 +0000 |
tree | 1a7b2a9d81e7dec1720cc2832cb853ff51eee2b8 | |
parent | d1d53e81f61d4b8379d1c06bb8d3662694168c05 [diff] |
InstSimplify: Simplify (X - (0 - Y)) if the second sub is NUW If the NUW bit is set for 0 - Y, we know that all values for Y other than 0 would produce a poison value. This allows us to replace (0 - Y) with 0 in the expression (X - (0 - Y)) which will ultimately leave us with X. This partially fixes PR20189. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214384 91177308-0d34-0410-b5e6-96231b3b80d8