================
@@ -326,6 +326,24 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
return cir::ComplexImagOp::create(*this, loc, resultType, operand);
}
+ mlir::Value createComplexAdd(mlir::Location loc, mlir::Value lhs,
+ mlir::Value rhs) {
+ cir::FenvAttr fenv;
+ if (isAnyFloatingPointType(
+ mlir::cast<cir::ComplexType>(lhs.getType()).getElementType()))
+ fenv = getConstrainedFPAttr();
+ return cir::ComplexAddOp::create(*this, loc, lhs, rhs, fenv);
----------------
erichkeane wrote:
I find myself wondering if we should just tolerate fenv on ALL operations, even
if it isn't floating point. Perhaps the answer is 'no', but 'accept and
ignore' here is perhaps not an awful behavior?
Do we verify that you don't have a complex-int if you have an fenv?
https://github.com/llvm/llvm-project/pull/224851
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits