================
@@ -560,6 +560,24 @@ mlir::LogicalResult lowerToConstrainedFPIntrinsic(
return mlir::success();
}
+static mlir::Value createConstrainedFPIntrinsicCall(
+ mlir::ConversionPatternRewriter &rewriter, mlir::Location loc,
+ mlir::ValueRange operands, mlir::Type llvmResTy, cir::FenvAttr fenv,
+ llvm::StringRef constrainedMnemonic, bool hasRoundingMode,
+ mlir::LLVM::FastmathFlags fastmathFlags = {}) {
+ llvm::SmallVector<mlir::Value> callOperands(operands.begin(),
operands.end());
+ if (hasRoundingMode)
+ callOperands.push_back(createFenvMetadataValue(
+ rewriter, loc, getConstrainedRoundingMetadata(fenv)));
+ callOperands.push_back(createFenvMetadataValue(
----------------
erichkeane wrote:
newline above this one please :)
https://github.com/llvm/llvm-project/pull/224851
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits