================
@@ -2241,6 +2241,28 @@ Value
*InstCombinerImpl::SimplifyDemandedUseFPClass(Value *V,
FPClassTest ValidResults = DemandedMask & Known.KnownFPClasses;
return getFPClassConstant(VTy, ValidResults, /*IsCanonicalizing=*/true);
}
+ case Instruction::FPExt: {
+ FPClassTest SrcDemandedMask = DemandedMask;
+
+ // No subnormal result does not imply not-subnormal in the source type.
+ if ((DemandedMask & fcNegSubnormal) == fcNone)
----------------
dtcxzyw wrote:
It is equivalent to `SrcDemandedMask = DemandedMask | fcSubnormal;`. if
((DemandedMask & fcNegNormal) != fcNone) SrcDemandedMask |= fcNegSubnormal;
should give a more precise result.
https://github.com/llvm/llvm-project/pull/174849
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits