[InstCombine] nsz: -(X - Y) --> Y - X
authorSanjay Patel <spatel@rotateright.com>
Thu, 5 Apr 2018 21:37:17 +0000 (21:37 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 5 Apr 2018 21:37:17 +0000 (21:37 +0000)
commit03e2526728d4548be925ad4c023dd41d8f6f363e
treec7bc86a730e106a667a11c8876590048ec04fa84
parentdaa8da1ff4cd09c879a97e1ea1d624bd7aec5a98
[InstCombine] nsz: -(X - Y) --> Y - X

This restores part of the fold that was removed with rL73243 (PR4374).

llvm-svn: 329350
llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
llvm/test/Transforms/InstCombine/fsub.ll