[PATCH] D28364: SimplifyLibCalls: Remove incorrect optimization of fabs
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 11:45:38 PST 2017
arsenm added inline comments.
================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:1200
- // Fold fabs(x * x) -> x * x; any squared FP value must already be positive.
- if (I->getOpcode() == Instruction::FMul)
- if (I->getOperand(0) == I->getOperand(1))
----------------
majnemer wrote:
> Couldn't this stay if the `fmul` is marked as `nnan`?
Yes, but I want to move this to an optimization on the intrinsic
https://reviews.llvm.org/D28364
More information about the llvm-commits
mailing list