================
@@ -5619,14 +5619,22 @@ void computeKnownFPClass(const Value *V, const APInt
&DemandedElts,
computeKnownFPClass(Op->getOperand(1), DemandedElts, InterestedSrcs,
KnownRHS, Q, Depth + 1);
+ // Special case fadd x, x, which is the canonical form of fmul x, 2.
+ bool SameOperands = Op->getOperand(0) == Op->getOperand(1);
----------------
dtcxzyw wrote:
Should check that x is not an undef.
Reference:
https://github.com/llvm/llvm-project/blob/0b24580a26644c8a44abc6fba97609552ba41d42/llvm/lib/Analysis/ValueTracking.cpp#L550-L553
https://github.com/llvm/llvm-project/pull/174123
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits