[Mlir-commits] [clang] [llvm] [mlir] [IRBuilder] Refactor for intrinsics const-folding (NFC) (PR #202738)
Yingwei Zheng
llvmlistbot at llvm.org
Mon Jun 15 09:47:28 PDT 2026
================
@@ -417,9 +417,9 @@ Instruction *InstCombinerImpl::foldSelectOpOp(SelectInst &SI, Instruction *TI,
Value *SelectVal = Builder.CreateSelect(Cond, LdexpVal0, LdexpVal1);
Value *SelectExp = Builder.CreateSelect(Cond, LdexpExp0, LdexpExp1);
- CallInst *NewLdexp = Builder.CreateIntrinsic(
- TII->getType(), Intrinsic::ldexp, {SelectVal, SelectExp});
- NewLdexp->setFastMathFlags(FMF);
+ Value *NewLdexp = Builder.CreateIntrinsic(
+ TII->getType(), Intrinsic::ldexp, {SelectVal, SelectExp}, {}, "",
+ [&FMF](CallInst *CI) { CI->setFastMathFlags(FMF); });
----------------
dtcxzyw wrote:
Just pass FMF as FMFSource into `CreateIntrinsic`.
https://github.com/llvm/llvm-project/pull/202738
More information about the Mlir-commits
mailing list