[all-commits] [llvm/llvm-project] 57e7ce: [IRBuilder] Add FMFSource overloads for CreateCall...

Kito Cheng via All-commits all-commits at lists.llvm.org
Wed Jul 8 18:23:24 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 57e7ceed3398ed1ddf28afdf78ba81cc2638c665
      https://github.com/llvm/llvm-project/commit/57e7ceed3398ed1ddf28afdf78ba81cc2638c665
  Author: Kito Cheng <kito.cheng at sifive.com>
  Date:   2026-07-09 (Thu, 09 Jul 2026)

  Changed paths:
    M llvm/include/llvm/IR/IRBuilder.h
    M llvm/lib/CodeGen/ReplaceWithVeclib.cpp
    M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
    M llvm/unittests/Analysis/ValueTrackingTest.cpp
    M llvm/unittests/IR/IRBuilderTest.cpp

  Log Message:
  -----------
  [IRBuilder] Add FMFSource overloads for CreateCall (#208171)

CreateCall had no way to set fast-math-flags at creation time, so
callers had to build the call and copy the flags in a second step:

  CallInst *C = B.CreateCall(Fn, Args);
  C->copyFastMathFlags(Src);

Add FMFSource overloads (mirroring CreateIntrinsic) so the flags can be
copied from a source instruction or FastMathFlags in one call:

  CallInst *C = B.CreateCall(Fn, Args, /*FMFSource=*/Src);

The FMFSource parameter has no default, so existing CreateCall callers
are unaffected and overload resolution stays unambiguous.

Assisted-by: Opus 4.8



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list