[llvm] InstSimplify: support floating-point equivalences (PR #115152)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 11:50:15 PST 2024


================
@@ -4635,33 +4635,29 @@ static Value *simplifySelectWithICmpEq(Value *CmpLHS, Value *CmpRHS,
 
 /// Try to simplify a select instruction when its condition operand is an
 /// integer comparison.
-static Value *simplifySelectWithICmpCond(Value *CondVal, Value *TrueVal,
-                                         Value *FalseVal,
-                                         const SimplifyQuery &Q,
-                                         unsigned MaxRecurse) {
+static Value *simplifySelectWithCmpCond(Value *CondVal, Value *TrueVal,
----------------
nikic wrote:

I don't think this function should change, nearly all code in here is not relevant for fcmp. Add a call to simplifySelectWithEquivalence in simplifySelectWithFCmp instead.

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


More information about the llvm-commits mailing list