Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions llvm/include/llvm/IR/IRBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -1005,23 +1005,25 @@ class IRBuilderBase {
const Twine &Name = "");

/// Create call to the minnum intrinsic.
Value *CreateMinNum(Value *LHS, Value *RHS, const Twine &Name = "") {
Value *CreateMinNum(Value *LHS, Value *RHS, const Twine &Name = "",
FMFSource FMFSource = {}) {
if (IsFPConstrained) {
return CreateConstrainedFPUnroundedBinOp(
Intrinsic::experimental_constrained_minnum, LHS, RHS, nullptr, Name);
Intrinsic::experimental_constrained_minnum, LHS, RHS, FMFSource, Name);
}

return CreateBinaryIntrinsic(Intrinsic::minnum, LHS, RHS, nullptr, Name);
return CreateBinaryIntrinsic(Intrinsic::minnum, LHS, RHS, FMFSource, Name);
}

/// Create call to the maxnum intrinsic.
Value *CreateMaxNum(Value *LHS, Value *RHS, const Twine &Name = "") {
Value *CreateMaxNum(Value *LHS, Value *RHS, const Twine &Name = "",
FMFSource FMFSource = {}) {
if (IsFPConstrained) {
return CreateConstrainedFPUnroundedBinOp(
Intrinsic::experimental_constrained_maxnum, LHS, RHS, nullptr, Name);
Intrinsic::experimental_constrained_maxnum, LHS, RHS, FMFSource, Name);
}

return CreateBinaryIntrinsic(Intrinsic::maxnum, LHS, RHS, nullptr, Name);
return CreateBinaryIntrinsic(Intrinsic::maxnum, LHS, RHS, FMFSource, Name);
}

/// Create call to the minimum intrinsic.
Expand Down
Loading