[llvm] [ValueTracking] Fix incorrect inferrence about the signbit of sqrt (PR #92510)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Fri May 17 05:51:04 PDT 2024
================
@@ -4940,11 +4940,8 @@ void computeKnownFPClass(const Value *V, const APInt &DemandedElts,
// subnormal input could produce a negative zero output.
const Function *F = II->getFunction();
if (Q.IIQ.hasNoSignedZeros(II) ||
- (F && KnownSrc.isKnownNeverLogicalNegZero(*F, II->getType()))) {
+ (F && KnownSrc.isKnownNeverLogicalNegZero(*F, II->getType())))
Known.knownNot(fcNegZero);
- if (KnownSrc.isKnownNeverNaN())
----------------
dtcxzyw wrote:
See the test `sqrt_negative_input_nnan`.
https://github.com/llvm/llvm-project/pull/92510
More information about the llvm-commits
mailing list