[llvm] [FPEnv] Add strictfp attribute to the FP environment manipulation intrinsics (PR #96093)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 19 10:21:45 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Kevin P. Neal (kpneal)
<details>
<summary>Changes</summary>
The constrained intrinsics already have strictfp added in the tablegen definitions. These environment manipulation intrinsics should as well since they touch the FP environment.
No change in visible behavior, and calls to them won't need the strictfp attribute because it was already added here. Existing tests don't need to be changed because calls from non-strictfp function to strictfp functions are allowed.
---
Full diff: https://github.com/llvm/llvm-project/pull/96093.diff
1 Files Affected:
- (modified) llvm/include/llvm/IR/Intrinsics.td (+5-5)
``````````diff
diff --git a/llvm/include/llvm/IR/Intrinsics.td b/llvm/include/llvm/IR/Intrinsics.td
index ef500329d1fb9..696641ab20d6d 100644
--- a/llvm/include/llvm/IR/Intrinsics.td
+++ b/llvm/include/llvm/IR/Intrinsics.td
@@ -1093,7 +1093,11 @@ def int_objectsize : DefaultAttrsIntrinsic<[llvm_anyint_ty],
//===--------------- Access to Floating Point Environment -----------------===//
//
-let IntrProperties = [IntrInaccessibleMemOnly, IntrWillReturn] in {
+/// IntrStrictFP - The intrinsic is allowed to be used in an alternate
+/// floating point environment or touches the current one.
+def IntrStrictFP : IntrinsicProperty;
+
+let IntrProperties = [IntrInaccessibleMemOnly, IntrWillReturn, IntrStrictFP] in {
def int_get_rounding : DefaultAttrsIntrinsic<[llvm_i32_ty], []>;
def int_set_rounding : DefaultAttrsIntrinsic<[], [llvm_i32_ty]>;
def int_get_fpenv : DefaultAttrsIntrinsic<[llvm_anyint_ty], []>;
@@ -1115,10 +1119,6 @@ def int_is_fpclass
//===--------------- Constrained Floating Point Intrinsics ----------------===//
//
-/// IntrStrictFP - The intrinsic is allowed to be used in an alternate
-/// floating point environment.
-def IntrStrictFP : IntrinsicProperty;
-
let IntrProperties = [IntrInaccessibleMemOnly, IntrWillReturn, IntrStrictFP] in {
def int_experimental_constrained_fadd : DefaultAttrsIntrinsic<[ llvm_anyfloat_ty ],
[ LLVMMatchType<0>,
``````````
</details>
https://github.com/llvm/llvm-project/pull/96093
More information about the llvm-commits
mailing list