[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

Kevin P. Neal via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 25 06:12:04 PDT 2024


kpneal wrote:

> > If we can't keep the constrained semantics and near-100% guarantee that no new exceptions will be introduced then operand bundles are not a replacement for the constrained intrinsics.
> 
> We would still need a call / function attribute to indicate strictfp calls, and such calls would then be annotatable with bundles to relax the assumptions. The default would always have to be the most conservative assumption

With the constrained intrinsics the default is safe because optimizations don't recognize the constrained intrinsic and thus don't know how to optimize it. If we instead rely on the strictfp attribute then we'll need possibly thousands of checks for this attribute, we'll need everyone going forward to remember to check for it, and we'll have no way to verify that this rule is being followed.

https://github.com/llvm/llvm-project/pull/109798


More information about the cfe-commits mailing list