================
@@ -2033,6 +2033,36 @@ static Constant *getFPClassConstant(Type *Ty,
FPClassTest Mask,
}
}
+static Value *simplifyDemandedUseFPClassFPTrunc(InstCombinerImpl &IC,
+ Instruction &I,
+ FPClassTest DemandedMask,
+ KnownFPClass &Known,
+ unsigned Depth) {
+ FPClassTest SrcDemandedMask = DemandedMask;
+
+ // Zero results may have been rounded from subnormal sources.
+ if (DemandedMask & fcNegZero)
+ SrcDemandedMask |= fcNegSubnormal;
+ if (DemandedMask & fcPosZero)
+ SrcDemandedMask |= fcPosSubnormal;
+
+ // Subnormal results may have been normal in the source type
+ if (DemandedMask & fcNegSubnormal)
+ SrcDemandedMask |= fcNegNormal;
+ if (DemandedMask & fcPosSubnormal)
+ SrcDemandedMask |= fcPosNormal;
+
----------------
dtcxzyw wrote:
Missing path from normal to inf.
https://github.com/llvm/llvm-project/pull/175421
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits