File: aarch64-mtune.c

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (34 lines) | stat: -rw-r--r-- 1,538 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Ensure we support the -mtune flag.

// GENERIC-CPU: "-target-cpu" "generic"

// There shouldn't be a default -mtune.
// RUN: %clang -### -c --target=aarch64 %s 2>&1 | FileCheck %s -check-prefix=NOTUNE
// NOTUNE-NOT: "-tune-cpu"

// RUN: %clang -### -c --target=aarch64 %s -mtune=generic 2>&1 | FileCheck %s -check-prefix=GENERIC
// GENERIC: "-tune-cpu" "generic"

// RUN: %clang -### -c --target=aarch64 %s -mtune=neoverse-n1 2>&1 | FileCheck %s --check-prefixes=GENERIC-CPU,NEOVERSE-N1
// NEOVERSE-N1: "-tune-cpu" "neoverse-n1"

// RUN: %clang -### -c --target=aarch64 %s -mtune=thunderx2t99 2>&1 | FileCheck %s -check-prefixes=GENERIC-CPU,THUNDERX2T99
// THUNDERX2T99: "-tune-cpu" "thunderx2t99"

// Check interaction between march and mtune.

// RUN: %clang -### -c --target=aarch64 %s -march=armv8-a 2>&1 | FileCheck %s --check-prefixes=GENERIC-CPU,MARCHARMV8A
// MARCHARMV8A-NOT: "-tune-cpu"

// RUN: %clang -### -c --target=aarch64 %s -march=armv8-a -mtune=cortex-a75 2>&1 | FileCheck %s --check-prefixes=GENERIC-CPU,MARCHARMV8A-A75
// MARCHARMV8A-A75: "-tune-cpu" "cortex-a75"

// Check interaction between mcpu and mtune.

// RUN: %clang -### -c --target=aarch64 %s -mcpu=thunderx 2>&1 | FileCheck %s -check-prefix=MCPUTHUNDERX
// MCPUTHUNDERX: "-target-cpu" "thunderx"
// MCPUTHUNDERX-NOT: "-tune-cpu"

// RUN: %clang -### -c --target=aarch64 %s -mcpu=cortex-a75 -mtune=cortex-a57 2>&1 | FileCheck %s -check-prefix=MCPUA75-MTUNEA57
// MCPUA75-MTUNEA57: "-target-cpu" "cortex-a75"
// MCPUA75-MTUNEA57: "-tune-cpu" "cortex-a57"