================
@@ -5673,12 +5673,24 @@ void computeKnownFPClass(const Value *V, const APInt 
&DemandedElts,
     break;
   }
   case Instruction::FMul: {
+    const Function *F = cast<Instruction>(Op)->getFunction();
+    DenormalMode Mode =
+        F ? F->getDenormalMode(
+                Op->getType()->getScalarType()->getFltSemantics())
+          : DenormalMode::getDynamic();
+
     // X * X is always non-negative or a NaN.
-    if (Op->getOperand(0) == Op->getOperand(1))
-      Known.knownNot(fcNegative);
+    if (Op->getOperand(0) == Op->getOperand(1)) {
----------------
dtcxzyw wrote:

Missing check for `isGuaranteedNotToBeUndef(X)` (It is only required when we 
add the non-neg constraint)

https://github.com/llvm/llvm-project/pull/173872
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to