[llvm] [GlobalISel] Avoid constant folding of different FP types in FCMP (PR #171878)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 12 06:43:25 PST 2025


================
@@ -74,6 +74,9 @@ bool CombinerHelper::constantFoldFCmp(const GFCmp &FCmp,
   APFloat LHS = LHSCst.getScalarValue();
   APFloat RHS = RHSCst.getScalarValue();
 
+  if (&LHS.getSemantics() != &RHS.getSemantics())
+    return false;
----------------
arsenm wrote:

But it's just papering over a problem somewhere else 

https://github.com/llvm/llvm-project/pull/171878


More information about the llvm-commits mailing list