[llvm-branch-commits] [llvm] ValueTracking: Handle amdgcn.rsq intrinsic in computeKnownFPClass (PR #171837)
Yingwei Zheng via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Dec 11 07:12:30 PST 2025
================
@@ -5553,6 +5553,37 @@ void computeKnownFPClass(const Value *V, const APInt &DemandedElts,
// TODO: Copy inf handling from instructions
break;
+ case Intrinsic::amdgcn_rsq: {
+ KnownFPClass KnownSrc;
+ // The only negative value that can be returned is -0 for -0 inputs.
+ Known.knownNot(fcNegInf | fcNegSubnormal | fcNegNormal);
----------------
dtcxzyw wrote:
`rsq(-0.0) = -inf`.
https://github.com/llvm/llvm-project/pull/171837
More information about the llvm-branch-commits
mailing list