Skip to content

Commit e0b01d8

Browse files
committed
Add missing features asserts
1 parent 29732d9 commit e0b01d8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,8 @@ ComplexExprEmitter::emitBinOps(const BinaryOperator *e, QualType promotionTy) {
389389
}
390390

391391
mlir::Value ComplexExprEmitter::emitBinAdd(const BinOpInfo &op) {
392+
assert(!cir::MissingFeatures::fastMathFlags());
393+
assert(!cir::MissingFeatures::cgFPOptionsRAII());
392394
return builder.create<cir::ComplexAddOp>(op.loc, op.lhs, op.rhs);
393395
}
394396

clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,6 +2385,8 @@ mlir::LogicalResult CIRToLLVMComplexAddOpLowering::matchAndRewrite(
23852385
newImag = rewriter.create<mlir::LLVM::AddOp>(loc, complexElemTy, lhsImag,
23862386
rhsImag);
23872387
} else {
2388+
assert(!cir::MissingFeatures::fastMathFlags());
2389+
assert(!cir::MissingFeatures::fpConstraints());
23882390
newReal = rewriter.create<mlir::LLVM::FAddOp>(loc, complexElemTy, lhsReal,
23892391
rhsReal);
23902392
newImag = rewriter.create<mlir::LLVM::FAddOp>(loc, complexElemTy, lhsImag,

0 commit comments

Comments
 (0)