[InstCombine] convert fsub nsz with fneg operand to -(X + Y)
authorSanjay Patel <spatel@rotateright.com>
Mon, 27 Jan 2020 19:40:43 +0000 (14:40 -0500)
committerSanjay Patel <spatel@rotateright.com>
Mon, 27 Jan 2020 19:49:15 +0000 (14:49 -0500)
commit242fed9d7fb96be691de5386627ee1eaa2f62b2b
tree1df0dce21248d32b98b7700be70fe9366b429b30
parentbcfa0f592f8f2d4ced9e102a2881bd95a7197b16
[InstCombine] convert fsub nsz with fneg operand to -(X + Y)

This was noted in D72521 - we need to match fneg specifically to
consistently handle that pattern along with (-0.0 - X).
llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
llvm/test/Transforms/InstCombine/fsub.ll
llvm/test/Transforms/Reassociate/fast-basictest.ll