[clang] [CIR] Record -ffp-contract=fast as a per-op contract flag (PR #226334)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 28 11:00:45 PDT 2026
================
@@ -51,10 +51,20 @@ CIRGenFunction::CIRGenFunction(CIRGenModule &cgm, CIRGenBuilderTy &builder,
ehStack.setCGF(this);
shouldEmitLifetimeMarkers = CodeGenUtils::shouldEmitLifetimeMarkers(
cgm.getCodeGenOpts(), getContext().getLangOpts());
+ setFastMathFlags(curFPFeatures);
}
CIRGenFunction::~CIRGenFunction() {}
+void CIRGenFunction::setFastMathFlags(FPOptions fpFeatures) {
+ // TODO(cir): set the remaining fast-math flags.
+ assert(!cir::MissingFeatures::fastMathFlags());
+ cir::FastMathFlags flags = cir::FastMathFlags::none;
+ if (fpFeatures.allowFPContractAcrossStatement())
----------------
andykaylor wrote:
Oh, I see. This is where the other fast-math flags would be set, but they are just being ignored. Is that just to limit the testing? It seems like we should just implement this properly all at once.
https://github.com/llvm/llvm-project/pull/226334
More information about the cfe-commits
mailing list