================
@@ -587,9 +588,17 @@ void CIRGenModule::constructFunctionReturnAttributes(
     retAttrs.set(mlir::LLVM::LLVMDialect::getNoUndefAttrName(),
                  mlir::UnitAttr::get(&getMLIRContext()));
 
-  // TODO(cir): classic codegen adds a bunch of attributes based on
-  // calling-convention lowering results.  However, since calling conventions
-  // haven't happened yet, this work likely has to happen there.
+  // nofpclass(nan inf) when -menable-no-infs / -menable-no-nans.
+  if (retTy->hasFloatingRepresentation()) {
+    unsigned mask = 0;
----------------
andykaylor wrote:

Can you move this into a `getNoFPClassTestMask` helper function as classic 
codegen does?

https://github.com/llvm/llvm-project/pull/191455
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to