[InstCombine] refactor fmul with negated op folds; NFCI
authorSanjay Patel <spatel@rotateright.com>
Fri, 23 Feb 2018 17:14:28 +0000 (17:14 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 23 Feb 2018 17:14:28 +0000 (17:14 +0000)
commit6b9c7a9c83fed425ac6f71d9378c749f3c496045
tree4f132ac49a71f903a8fc330f9ed52c765c374c28
parent4a9116e8976f0c137b38d421497650b1337e73fc
[InstCombine] refactor fmul with negated op folds; NFCI

The existing code was inefficiently looking for 'nsz' variants.
That's unnecessary because we canonicalize those to the expected
form with -0.0.

We may also want to adjust or remove the fold that sinks negation.
We don't do that for fdiv (or integer ops?). That should be uniform?
It may also lead to missed optimization as in PR21914:
https://bugs.llvm.org/show_bug.cgi?id=21914
...or we just have to fix other passes to avoid that problem.

llvm-svn: 325924
llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp