[clang] [CIR] Support strict floating-point in Complex Add & Sub (PR #224851)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 21 07:15:55 PDT 2026
================
@@ -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
More information about the cfe-commits
mailing list