comparison clang/test/Driver/aix-mcpu-default.c @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 79ff65ed7e25
children
comparison
equal deleted inserted replaced
232:70dce7da266c 236:c4bab56944e8
1 // Check that the target cpu defaults to power7 on AIX7.2 and up. 1 // Check that the target cpu defaults to power7 on AIX7.2 and up.
2 // RUN: %clang -no-canonical-prefixes %s -### -c 2>&1 \ 2 // RUN: %clang %s -### -c 2>&1 --target=powerpc-ibm-aix7.2 \
3 // RUN: -target powerpc-ibm-aix7.2 \
4 // RUN: | FileCheck --check-prefix=CHECK-MCPU-DEFAULT-AIX72 %s 3 // RUN: | FileCheck --check-prefix=CHECK-MCPU-DEFAULT-AIX72 %s
4
5 // Check that the target cpu defaults to power7 on AIX7.2 and up.
6 // RUN: %clang %s -### -c 2>&1 --target=powerpc64-ibm-aix7.2 \
7 // RUN: | FileCheck --check-prefix=CHECK-MCPU-DEFAULT-AIX72 %s
8
9 // Check that the target cpu defaults to power7 on AIX7.1 and below.
10 // RUN: %clang %s -### -c 2>&1 --target=powerpc-ibm-aix7.1 \
11 // RUN: | FileCheck --check-prefix=CHECK-MCPU-DEFAULT-AIX72 %s
12
13 // Check that the target cpu defaults to power7 on AIX7.1 and below.
14 // RUN: %clang %s -### -c 2>&1 --target=powerpc64-ibm-aix7.1 \
15 // RUN: | FileCheck --check-prefix=CHECK-MCPU-DEFAULT-AIX72 %s
16
17 // Check that the target cpu defaults to power7 when level not specified.
18 // RUN: %clang %s -### -c 2>&1 --target=powerpc-ibm-aix \
19 // RUN: | FileCheck --check-prefix=CHECK-MCPU-DEFAULT-AIX72 %s
20
21 // Check that the target cpu defaults to power7 when level not specified.
22 // RUN: %clang %s -### -c 2>&1 --target=powerpc64-ibm-aix \
23 // RUN: | FileCheck --check-prefix=CHECK-MCPU-DEFAULT-AIX72 %s
24
5 // CHECK-MCPU-DEFAULT-AIX72-NOT: warning: 25 // CHECK-MCPU-DEFAULT-AIX72-NOT: warning:
6 // CHECK-MCPU-DEFAULT-AIX72: {{.*}}clang{{.*}}" "-cc1" 26 // CHECK-MCPU-DEFAULT-AIX72: "-cc1"
7 // CHECK-MCPU-DEFAULT-AIX72: "-target-cpu" "pwr7" 27 // CHECK-MCPU-DEFAULT-AIX72: "-target-cpu" "pwr7"
8 28
9 // Check that the target cpu defaults to power4 on AIX7.1 and below.
10 // RUN: %clang -no-canonical-prefixes %s -### -c 2>&1 \
11 // RUN: -target powerpc-ibm-aix7.1 \
12 // RUN: | FileCheck --check-prefix=CHECK-MCPU-DEFAULT-AIX71 %s
13 // CHECK-MCPU-DEFAULT-AIX71-NOT: warning:
14 // CHECK-MCPU-DEFAULT-AIX71: {{.*}}clang{{.*}}" "-cc1"
15 // CHECK-MCPU-DEFAULT-AIX71: "-target-cpu" "pwr4"
16
17 // Check that the user is able to overwrite the default with '-mcpu'. 29 // Check that the user is able to overwrite the default with '-mcpu'.
18 // RUN: %clang -no-canonical-prefixes %s -### -c 2>&1 \ 30 // RUN: %clang %s -### -c 2>&1 -mcpu=pwr6 --target=powerpc-ibm-aix \
19 // RUN: -mcpu=pwr6 \
20 // RUN: -target powerpc-ibm-aix \
21 // RUN: | FileCheck --check-prefix=CHECK-MCPU-USER %s 31 // RUN: | FileCheck --check-prefix=CHECK-MCPU-USER %s
22 // CHECK-MCPU-USER-NOT: warning: 32 // CHECK-MCPU-USER-NOT: warning:
23 // CHECK-MCPU-USER: {{.*}}clang{{.*}}" "-cc1" 33 // CHECK-MCPU-USER: "-cc1"
24 // CHECK-MCPU-USER: "-target-cpu" "pwr6" 34 // CHECK-MCPU-USER: "-target-cpu" "pwr6"