[llvm] [ARM][Thumb2] Mark BTI-clearing instructions as scheduling region boundaries (PR #79173)
Momchil Velikov via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 5 03:02:13 PDT 2024
================
@@ -0,0 +1,166 @@
+# RUN: llc -o - -run-pass=machine-scheduler -misched=shuffle %s | FileCheck %s
+# RUN: llc -o - -run-pass=postmisched %s | FileCheck %s
+
+--- |
+ target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
+ target triple = "thumbv8.1m.main-arm-none-eabi"
+
+ define i32 @foo_bti() #0 {
+ entry:
+ ret i32 0
+ }
+
+ define i32 @foo_pac() #0 {
+ entry:
+ ret i32 0
+ }
+
+ define i32 @foo_pacbti() #0 {
+ entry:
+ ret i32 0
+ }
+
+ define i32 @foo_setjmp() #0 {
+ entry:
+ ret i32 0
+ if.then:
+ ret i32 0
+ }
+
+ define i32 @foo_sg() #0 {
+ entry:
+ ret i32 0
+ }
+
+ declare i32 @setjmp(ptr noundef) #1
+ declare void @longjmp(ptr noundef, i32 noundef) #2
+
+ attributes #0 = { "frame-pointer"="all" "target-cpu"="cortex-m55" "target-features"="+armv8.1-m.main" }
+ attributes #1 = { nounwind returns_twice "frame-pointer"="all" "target-cpu"="cortex-m55" "target-features"="+armv8.1-m.main" }
+ attributes #2 = { noreturn nounwind "frame-pointer"="all" "target-cpu"="cortex-m55" "target-features"="+armv8.1-m.main" }
----------------
momchil-velikov wrote:
Passing a target (or other things) via the command line is inconvenient during development or when you want to run the test manually. Unless one wants to run a test on the same function with different sets of attributes, using `attributes #N` is preferable.
https://github.com/llvm/llvm-project/pull/79173
More information about the llvm-commits
mailing list