================
@@ -2091,6 +2110,86 @@ Value
*InstCombinerImpl::SimplifyDemandedUseFPClass(Value *V,
Known.fneg();
break;
}
+ case Instruction::FAdd: {
+ KnownFPClass KnownLHS, KnownRHS;
+
+ const SimplifyQuery &SQ = getSimplifyQuery();
+
+ // fadd x, x can be handled more aggressively.
+ if (I->getOperand(0) == I->getOperand(1) &&
+ isGuaranteedNotToBeUndef(I->getOperand(0), SQ.AC, CxtI, SQ.DT,
+ Depth + 1)) {
+ FPClassTest SrcDemandedMask = DemandedMask;
+
+ // Doubling a subnormal could have resulted in a normal value.
----------------
dtcxzyw wrote:
Doubling a subnormal may produce zero.
https://github.com/llvm/llvm-project/pull/174853
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits