[PATCH] D27932: InstSimplify: Eliminate fabs on known positive
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 4 08:48:53 PST 2017
arsenm added inline comments.
================
Comment at: lib/Analysis/ValueTracking.cpp:2614
if (I->getOperand(0) == I->getOperand(1))
return true;
LLVM_FALLTHROUGH;
----------------
efriedma wrote:
> IIRC, A*A->A if A is a NaN, so fabs(x*x) isn't equivalent to x*x.
I think the sign of a NaN is OK to ignore
https://reviews.llvm.org/D27932
More information about the llvm-commits
mailing list