[cfe-dev] RFC: Create new clang builtin __arithmetic_fence control FP optimization at expression level

Blower, Melanie I via cfe-dev cfe-dev at lists.llvm.org
Tue Apr 6 07:38:04 PDT 2021


Intel would like to contribute a new intrinsic llvm.arith.fence to control floating point optimization at the expression level. We are also proposing a new clang builtin, __arithmetic_fence, that provides access to this intrinsic, as well as a new clang command line option -fprotect-parens that will be implemented using this intrinsic.

The purpose is to provide fine control, at the expression level, over floating point optimization when -ffast-math (-ffp-model=fast) is enabled. We are also proposing a new clang command line optionĀ -fprotect-parensĀ that will be implemented using this intrinsic.

The RFC and preliminary llvm patch is here, https://reviews.llvm.org/D99675, looking for comments!  Thank you.  I'll post a clang patch later this week. 



More information about the cfe-dev mailing list