Debian Codegraph @

clang/test/Driver/ppc-crbits.cpp

raw
1 // RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -mcpu=pwr10 \
2 // RUN: -mcrbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-CRBITS %s
3 // RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -mcpu=pwr10 \
4 // RUN: -mno-crbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOCRBITS %s
5
6 // RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -mcpu=pwr9 \
7 // RUN: -mcrbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-CRBITS %s
8 // RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -mcpu=pwr9 \
9 // RUN: -mno-crbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOCRBITS %s
10
11 // RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -mcpu=pwr8 \
12 // RUN: -mcrbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-CRBITS %s
13 // RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -mcpu=pwr8 \
14 // RUN: -mno-crbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOCRBITS %s
15
16 // RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -mcpu=pwr7 \
17 // RUN: -mcrbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-CRBITS %s
18 // RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -mcpu=pwr7 \
19 // RUN: -mno-crbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOCRBITS %s
20
21 // RUN: %clang -target powerpc-ibm-aix %s -### -mcpu=pwr10 \
22 // RUN: -mcrbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-CRBITS %s
23 // RUN: %clang -target powerpc-ibm-aix %s -### -mcpu=pwr10 \
24 // RUN: -mno-crbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOCRBITS %s
25
26 // RUN: %clang -target powerpc-ibm-aix %s -### -mcpu=pwr9 \
27 // RUN: -mcrbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-CRBITS %s
28 // RUN: %clang -target powerpc-ibm-aix %s -### -mcpu=pwr9 \
29 // RUN: -mno-crbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOCRBITS %s
30
31 // RUN: %clang -target powerpc-ibm-aix %s -### -mcpu=pwr8 \
32 // RUN: -mcrbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-CRBITS %s
33 // RUN: %clang -target powerpc-ibm-aix %s -### -mcpu=pwr8 \
34 // RUN: -mno-crbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOCRBITS %s
35
36 // RUN: %clang -target powerpc-ibm-aix %s -### -mcpu=pwr7 \
37 // RUN: -mcrbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-CRBITS %s
38 // RUN: %clang -target powerpc-ibm-aix %s -### -mcpu=pwr7 \
39 // RUN: -mno-crbits -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOCRBITS %s
40
41
42 // CHECK-NOCRBITS: "-target-feature" "-crbits"
43 // CHECK-CRBITS: "-target-feature" "+crbits"
44
45
46 // RUN: %clang -target powerpc64le-unknown-linux-gnu -mcpu=pwr10 -emit-llvm \
47 // RUN: -S %s -o - | FileCheck %s --check-prefix=HAS-CRBITS
48 // RUN: %clang -target powerpc64le-unknown-linux-gnu -mcpu=pwr10 -mcrbits \
49 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-CRBITS
50 // RUN: %clang -target powerpc64le-unknown-linux-gnu -mcpu=pwr10 -mno-crbits \
51 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-NOCRBITS
52
53 // RUN: %clang -target powerpc64le-unknown-linux-gnu -mcpu=pwr9 -emit-llvm \
54 // RUN: -S %s -o - | FileCheck %s --check-prefix=HAS-CRBITS
55 // RUN: %clang -target powerpc64le-unknown-linux-gnu -mcpu=pwr9 -mcrbits \
56 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-CRBITS
57 // RUN: %clang -target powerpc64le-unknown-linux-gnu -mcpu=pwr9 -mno-crbits \
58 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-NOCRBITS
59
60 // RUN: %clang -target powerpc64le-unknown-linux-gnu -mcpu=pwr8 -emit-llvm \
61 // RUN: -S %s -o - | FileCheck %s --check-prefix=HAS-CRBITS
62 // RUN: %clang -target powerpc64le-unknown-linux-gnu -mcpu=pwr8 -mcrbits \
63 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-CRBITS
64 // RUN: %clang -target powerpc64le-unknown-linux-gnu -mcpu=pwr8 -mno-crbits \
65 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-NOCRBITS
66
67 // RUN: %clang -target powerpc64le-unknown-linux-gnu -mcpu=pwr7 -mcrbits \
68 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-CRBITS
69 // RUN: %clang -target powerpc64le-unknown-linux-gnu -mcpu=pwr7 -mno-crbits \
70 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-NOCRBITS
71
72 // RUN: %clang -target powerpc-ibm-aix -mcpu=pwr10 -emit-llvm \
73 // RUN: -S %s -o - | FileCheck %s --check-prefix=HAS-CRBITS
74 // RUN: %clang -target powerpc-ibm-aix -mcpu=pwr10 -mcrbits \
75 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-CRBITS
76 // RUN: %clang -target powerpc-ibm-aix -mcpu=pwr10 -mno-crbits \
77 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-NOCRBITS
78
79 // RUN: %clang -target powerpc-ibm-aix -mcpu=pwr9 -emit-llvm \
80 // RUN: -S %s -o - | FileCheck %s --check-prefix=HAS-CRBITS
81 // RUN: %clang -target powerpc-ibm-aix -mcpu=pwr9 -mcrbits \
82 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-CRBITS
83 // RUN: %clang -target powerpc-ibm-aix -mcpu=pwr9 -mno-crbits \
84 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-NOCRBITS
85
86 // RUN: %clang -target powerpc-ibm-aix -mcpu=pwr8 -emit-llvm \
87 // RUN: -S %s -o - | FileCheck %s --check-prefix=HAS-CRBITS
88 // RUN: %clang -target powerpc-ibm-aix -mcpu=pwr8 -mcrbits \
89 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-CRBITS
90 // RUN: %clang -target powerpc-ibm-aix -mcpu=pwr8 -mno-crbits \
91 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-NOCRBITS
92
93 // RUN: %clang -target powerpc-ibm-aix -mcpu=pwr7 -mcrbits \
94 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-CRBITS
95 // RUN: %clang -target powerpc-ibm-aix -mcpu=pwr7 -mno-crbits \
96 // RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-NOCRBITS
97
98
99 // HAS-CRBITS: main(
100 // HAS-CRBITS: attributes #0 = {
101 // HAS-CRBITS-SAME: +crbits
102 // HAS-NOCRBITS: main(
103 // HAS-NOCRBITS: attributes #0 = {
104 // HAS-NOCRBITS-SAME: -crbits
105
106 int main(int argc, char *argv[]) {
107 return 0;
108 }