[llvm] [ValueTracking] Fix incorrect inferrence about the signbit of sqrt (PR #92510)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri May 17 05:12:13 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())
----------------
arsenm wrote:
Semi-related, this should be using propagateNaN instead of repeating the snan logic
https://github.com/llvm/llvm-project/pull/92510
More information about the llvm-commits
mailing list