[PATCH] D62612: [InstCombine] Handle -(X-Y) --> (Y-X) for unary fneg when NSZ
Cameron McInally via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 10:49:21 PDT 2019
cameron.mcinally added a subscriber: jyknight.
cameron.mcinally added a comment.
I'd be open to opinions on if this optimization should be throttled for NaNs too. My understanding is that IEEE-754 does not specify the sign of NaN results for FSub, so it doesn't matter if an FNeg is performed on the result or not.
That said, in practice, whether this combine is performed or not could change the sign of a NaN....
CHANGES SINCE LAST ACTION
More information about the llvm-commits