[llvm] [LLVM][InstSimplify] Refactor simplifyBinaryIntrinsic to remove Call operand. (PR #196309)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu May 7 06:02:37 PDT 2026
================
@@ -7133,12 +7130,16 @@ Value *llvm::simplifyBinaryIntrinsic(Intrinsic::ID IID, Type *ReturnType,
MinMaxOptResult OptResult = MinMaxOptResult::CannotOptimize;
Constant *NewConst = nullptr;
+ FastMathFlags FMF;
+ if (auto *FPMO = dyn_cast_if_present<FPMathOperator>(Q.CxtI))
----------------
nikic wrote:
I realize that we use this kind of hack elsewhere, but we really shouldn't be taking FMF from the context instruction, and instead pass it in as a separate argument. The problem is that the context instruction is not necessarily the same as the instruction being simplified.
https://github.com/llvm/llvm-project/pull/196309
More information about the llvm-commits
mailing list