diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2014-07-31 04:49:18 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2014-07-31 04:49:18 +0000 |
| commit | cd4fbcd1bb463a1d2b99808f52c1b6b99e82ef4d (patch) | |
| tree | 731086f2e2b65c67a994c9d061df63c70ec20bd4 /llvm/lib/Transforms | |
| parent | 32dbdf62bec05f18e8f2710a110fa4e7f31fdc01 (diff) | |
| download | bcm5719-llvm-cd4fbcd1bb463a1d2b99808f52c1b6b99e82ef4d.tar.gz bcm5719-llvm-cd4fbcd1bb463a1d2b99808f52c1b6b99e82ef4d.zip | |
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
Diffstat (limited to 'llvm/lib/Transforms')
0 files changed, 0 insertions, 0 deletions

