| commit | cd4fbcd1bb463a1d2b99808f52c1b6b99e82ef4d | [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 | 731086f2e2b65c67a994c9d061df63c70ec20bd4 | |
| parent | 32dbdf62bec05f18e8f2710a110fa4e7f31fdc01 [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. llvm-svn: 214384