[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / aarch64-call-saved-x-register.c
blobd61a6df618c32aeb51b99374db29e2120bd1a1b3
1 // RUN: %clang --target=aarch64-none-gnu -fcall-saved-x8 -### %s 2>&1 \
2 // RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X8 %s
4 // RUN: %clang --target=aarch64-none-gnu -fcall-saved-x9 -### %s 2>&1 \
5 // RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X9 %s
7 // RUN: %clang --target=aarch64-none-gnu -fcall-saved-x10 -### %s 2>&1 \
8 // RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X10 %s
10 // RUN: %clang --target=aarch64-none-gnu -fcall-saved-x11 -### %s 2>&1 \
11 // RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X11 %s
13 // RUN: %clang --target=aarch64-none-gnu -fcall-saved-x12 -### %s 2>&1 \
14 // RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X12 %s
16 // RUN: %clang --target=aarch64-none-gnu -fcall-saved-x13 -### %s 2>&1 \
17 // RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X13 %s
19 // RUN: %clang --target=aarch64-none-gnu -fcall-saved-x14 -### %s 2>&1 \
20 // RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X14 %s
22 // RUN: %clang --target=aarch64-none-gnu -fcall-saved-x15 -### %s 2>&1 \
23 // RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X15 %s
25 // RUN: %clang --target=aarch64-none-gnu -fcall-saved-x18 -### %s 2>&1 \
26 // RUN: | FileCheck --check-prefix=CHECK-CALL-SAVED-X18 %s
28 // Test all call-saved-x# options together.
29 // RUN: %clang --target=aarch64-none-gnu \
30 // RUN: -fcall-saved-x8 \
31 // RUN: -fcall-saved-x9 \
32 // RUN: -fcall-saved-x10 \
33 // RUN: -fcall-saved-x11 \
34 // RUN: -fcall-saved-x12 \
35 // RUN: -fcall-saved-x13 \
36 // RUN: -fcall-saved-x14 \
37 // RUN: -fcall-saved-x15 \
38 // RUN: -fcall-saved-x18 \
39 // RUN: -### %s 2>&1 | FileCheck %s \
40 // RUN: --check-prefix=CHECK-CALL-SAVED-X8 \
41 // RUN: --check-prefix=CHECK-CALL-SAVED-X9 \
42 // RUN: --check-prefix=CHECK-CALL-SAVED-X10 \
43 // RUN: --check-prefix=CHECK-CALL-SAVED-X11 \
44 // RUN: --check-prefix=CHECK-CALL-SAVED-X12 \
45 // RUN: --check-prefix=CHECK-CALL-SAVED-X13 \
46 // RUN: --check-prefix=CHECK-CALL-SAVED-X14 \
47 // RUN: --check-prefix=CHECK-CALL-SAVED-X15 \
48 // RUN: --check-prefix=CHECK-CALL-SAVED-X18
50 // CHECK-CALL-SAVED-X8: "-target-feature" "+call-saved-x8"
51 // CHECK-CALL-SAVED-X9: "-target-feature" "+call-saved-x9"
52 // CHECK-CALL-SAVED-X10: "-target-feature" "+call-saved-x10"
53 // CHECK-CALL-SAVED-X11: "-target-feature" "+call-saved-x11"
54 // CHECK-CALL-SAVED-X12: "-target-feature" "+call-saved-x12"
55 // CHECK-CALL-SAVED-X13: "-target-feature" "+call-saved-x13"
56 // CHECK-CALL-SAVED-X14: "-target-feature" "+call-saved-x14"
57 // CHECK-CALL-SAVED-X15: "-target-feature" "+call-saved-x15"
58 // CHECK-CALL-SAVED-X18: "-target-feature" "+call-saved-x18"