[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / aarch64-target-as-march.s
blobae77d08c5ecc4f3437b764d6339e55c336098890
1 /// These tests make sure that options passed to the assembler
2 /// via -Wa or -Xassembler are applied correctly to assembler inputs.
4 /// Does not apply to non assembly files
5 // RUN: %clang --target=aarch64 -### -c -Wa,-march=armv8.1-a \
6 // RUN: %S/Inputs/wildcard1.c 2>&1 | FileCheck --check-prefix=TARGET-FEATURE-1 %s
7 // RUN: %clang --target=aarch64 -### -c -Xassembler -march=armv8.1-a \
8 // RUN: %S/Inputs/wildcard1.c 2>&1 | FileCheck --check-prefix=TARGET-FEATURE-1 %s
10 // TARGET-FEATURE-1-NOT: "-target-feature" "+v8.1a"
12 /// Does apply to assembler input
13 // RUN: %clang --target=aarch64 -### -c -Wa,-march=armv8.2-a %s 2>&1 | \
14 // RUN: FileCheck --check-prefix=TARGET-FEATURE-2 %s
15 // RUN: %clang --target=aarch64 -### -c -Xassembler -march=armv8.2-a %s 2>&1 | \
16 // RUN: FileCheck --check-prefix=TARGET-FEATURE-2 %s
18 // TARGET-FEATURE-2: "-target-feature" "+v8.2a"
20 /// No unused argument warnings when there are multiple values
21 // RUN: %clang --target=aarch64 -### -c -Wa,-march=armv8.1-a -Wa,-march=armv8.2-a %s 2>&1 | \
22 // RUN: FileCheck --check-prefix=UNUSED-WARNING %s
24 // UNUSED-WARNING-NOT: warning: argument unused during compilation
26 /// Last march to assembler wins
27 // RUN: %clang --target=aarch64 -### -c -Wa,-march=armv8.2-a -Wa,-march=armv8.1-a %s 2>&1 | \
28 // RUN: FileCheck --check-prefix=MULTIPLE-VALUES %s
29 // RUN: %clang --target=aarch64 -### -c -Wa,-march=armv8.2-a,-march=armv8.1-a %s 2>&1 | \
30 // RUN: FileCheck --check-prefix=MULTIPLE-VALUES %s
31 // RUN: %clang --target=aarch64 -### -c -Xassembler -march=armv8.2-a -Xassembler \
32 // RUN: -march=armv8.1-a %s 2>&1 | FileCheck --check-prefix=MULTIPLE-VALUES %s
34 // MULTIPLE-VALUES: "-target-feature" "+v8.1a
35 // MULTIPLE-VALUES-NOT: "-target-feature" "+v8.2a
37 /// march to compiler and assembler, we choose the one suited to the input file type
38 // RUN: %clang --target=aarch64 -### -c -Wa,-march=armv8.3-a -march=armv8.4-a %s 2>&1 | \
39 // RUN: FileCheck --check-prefix=TARGET-FEATURE-3 %s
40 // RUN: %clang --target=aarch64 -### -c -Wa,-march=armv8.3-a -march=armv8.4-a \
41 // RUN: %S/Inputs/wildcard1.c 2>&1 | FileCheck --check-prefix=TARGET-FEATURE-4 %s
43 // TARGET-FEATURE-3: "-target-feature" "+v8.3a"
44 // TARGET-FEATURE-3-NOT: "-target-feature" "+v8.4a"
45 // TARGET-FEATURE-4: "-target-feature" "+v8.4a"
46 // TARGET-FEATURE-4-NOT: "-target-feature" "+v8.3a"
48 // Invalid -march settings
49 // RUN: not %clang --target=aarch64 -### -c -Wa,-march=all %s 2>&1 | \
50 // RUN: FileCheck --check-prefix=INVALID-ARCH-1 %s
51 // RUN: not %clang --target=aarch64 -### -c -Wa,-march=foobar %s 2>&1 | \
52 // RUN: FileCheck --check-prefix=INVALID-ARCH-2 %s
54 // INVALID-ARCH-1: error: unsupported argument 'all' to option '-march='
55 // INVALID-ARCH-2: error: unsupported argument 'foobar' to option '-march='