[llvm] [llvm] Don't combine repeated subnormal divisors (PR #149333)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 17 10:57:21 PDT 2025
================
@@ -18235,6 +18235,16 @@ SDValue DAGCombiner::combineRepeatedFPDivisors(SDNode *N) {
if (N0CFP && (N0CFP->isExactlyValue(1.0) || N0CFP->isExactlyValue(-1.0)))
return SDValue();
+ // Skip if we have subnormals, multiplying with the reciprocal will introduce
+ // infinities.
+ ConstantFPSDNode *N1CFP = isConstOrConstSplatFP(N1, /* AllowUndefs */ true);
----------------
efriedma-quic wrote:
Right, there's no way to consistently disable the transform for subnormals without completely disabling arcp for non-constant denominators. I don't really want to deal with the bug report that SimplifyCFG is illegally transforming floating-point code...
https://github.com/llvm/llvm-project/pull/149333
More information about the llvm-commits
mailing list