Skip to content

[ARM] [IR] [Builtins] Give the data barrier instructions the same attributes they have in AArch64 #152415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AZero13
Copy link
Contributor

@AZero13 AZero13 commented Aug 7, 2025

They are IntrNoFree and IntrWillReturn, so give them that.

…ributes they have in AArch64

They are IntrNoFree and IntrWillReturn, so give them that.
@llvmbot
Copy link
Member

llvmbot commented Aug 7, 2025

@llvm/pr-subscribers-llvm-ir

@llvm/pr-subscribers-backend-arm

Author: AZero13 (AZero13)

Changes

They are IntrNoFree and IntrWillReturn, so give them that.


Full diff: https://github.com/llvm/llvm-project/pull/152415.diff

1 Files Affected:

  • (modified) llvm/include/llvm/IR/IntrinsicsARM.td (+3-4)
diff --git a/llvm/include/llvm/IR/IntrinsicsARM.td b/llvm/include/llvm/IR/IntrinsicsARM.td
index 1219ce2f86da8..89e412180fc31 100644
--- a/llvm/include/llvm/IR/IntrinsicsARM.td
+++ b/llvm/include/llvm/IR/IntrinsicsARM.td
@@ -299,13 +299,12 @@ def int_arm_ldaexd : Intrinsic<[llvm_i32_ty, llvm_i32_ty], [llvm_ptr_ty]>;
 //===----------------------------------------------------------------------===//
 // Data barrier instructions
 
-// TODO: Add applicable default attributes.
 def int_arm_dmb : ClangBuiltin<"__builtin_arm_dmb">, MSBuiltin<"__dmb">,
-                  Intrinsic<[], [llvm_i32_ty]>;
+                  Intrinsic<[], [llvm_i32_ty], [IntrNoFree, IntrWillReturn]>;
 def int_arm_dsb : ClangBuiltin<"__builtin_arm_dsb">, MSBuiltin<"__dsb">,
-                  Intrinsic<[], [llvm_i32_ty]>;
+                  Intrinsic<[], [llvm_i32_ty], [IntrNoFree, IntrWillReturn]>;
 def int_arm_isb : ClangBuiltin<"__builtin_arm_isb">, MSBuiltin<"__isb">,
-                  Intrinsic<[], [llvm_i32_ty]>;
+                  Intrinsic<[], [llvm_i32_ty], [IntrNoFree, IntrWillReturn]>;
 
 //===----------------------------------------------------------------------===//
 // VFP

@hstk30-hw hstk30-hw requested review from nikic and david-arm August 7, 2025 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants