• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -triple i686-unknown-unknown -emit-llvm -o - %s | \
2 // RUN:     FileCheck --check-prefix=I686-UNKNOWN %s
3 // I686-UNKNOWN: target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
4 
5 // RUN: %clang_cc1 -triple i686-apple-darwin9 -emit-llvm -o - %s | \
6 // RUN:     FileCheck --check-prefix=I686-DARWIN %s
7 // I686-DARWIN: target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"
8 
9 // RUN: %clang_cc1 -triple i686-unknown-win32 -emit-llvm -o - %s | \
10 // RUN:     FileCheck --check-prefix=I686-WIN32 %s
11 // I686-WIN32: target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
12 
13 // RUN: %clang_cc1 -triple i686-unknown-cygwin -emit-llvm -o - %s | \
14 // RUN:     FileCheck --check-prefix=I686-CYGWIN %s
15 // I686-CYGWIN: target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
16 
17 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | \
18 // RUN:     FileCheck --check-prefix=X86_64 %s
19 // X86_64: target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
20 
21 // RUN: %clang_cc1 -triple xcore-unknown-unknown -emit-llvm -o - %s | \
22 // RUN:     FileCheck --check-prefix=XCORE %s
23 // XCORE: target datalayout = "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:32-f64:32-a:0:32-n32"
24 
25 // RUN: %clang_cc1 -triple sparc-sun-solaris -emit-llvm -o - %s | \
26 // RUN:     FileCheck %s --check-prefix=SPARC-V8
27 // SPARC-V8: target datalayout = "E-m:e-p:32:32-i64:64-f128:64-n32-S64"
28 
29 // RUN: %clang_cc1 -triple sparcv9-sun-solaris -emit-llvm -o - %s | \
30 // RUN: FileCheck %s --check-prefix=SPARC-V9
31 // SPARC-V9: target datalayout = "E-m:e-i64:64-n32:64-S128"
32 
33 // RUN: %clang_cc1 -triple mipsel-linux-gnu -o - -emit-llvm %s |     \
34 // RUN: FileCheck %s -check-prefix=MIPS-32EL
35 // MIPS-32EL: target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
36 
37 // RUN: %clang_cc1 -triple mips-linux-gnu -o - -emit-llvm %s | \
38 // RUN: FileCheck %s -check-prefix=MIPS-32EB
39 // MIPS-32EB: target datalayout = "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
40 
41 // RUN: %clang_cc1 -triple mips64el-linux-gnu -o - -emit-llvm %s | \
42 // RUN: FileCheck %s -check-prefix=MIPS-64EL
43 // MIPS-64EL: target datalayout = "e-m:m-i8:8:32-i16:16:32-i64:64-n32:64-S128"
44 
45 // RUN: %clang_cc1 -triple mips64el-linux-gnu -o - -emit-llvm -target-abi n32 \
46 // RUN: %s | FileCheck %s -check-prefix=MIPS-64EL-N32
47 // MIPS-64EL-N32: target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32:64-S128"
48 
49 // RUN: %clang_cc1 -triple mips64-linux-gnu -o - -emit-llvm %s | \
50 // RUN: FileCheck %s -check-prefix=MIPS-64EB
51 // MIPS-64EB: target datalayout = "E-m:m-i8:8:32-i16:16:32-i64:64-n32:64-S128"
52 
53 // RUN: %clang_cc1 -triple mips64-linux-gnu -o - -emit-llvm %s -target-abi n32 \
54 // RUN: | FileCheck %s -check-prefix=MIPS-64EB-N32
55 // MIPS-64EB-N32: target datalayout = "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32:64-S128"
56 
57 // RUN: %clang_cc1 -triple powerpc64-lv2 -o - -emit-llvm %s | \
58 // RUN: FileCheck %s -check-prefix=PS3
59 // PS3: target datalayout = "E-m:e-p:32:32-i64:64-n32:64"
60 
61 // RUN: %clang_cc1 -triple i686-nacl -o - -emit-llvm %s | \
62 // RUN: FileCheck %s -check-prefix=I686-NACL
63 // I686-NACL: target datalayout = "e-m:e-p:32:32-i64:64-n8:16:32-S128"
64 
65 // RUN: %clang_cc1 -triple x86_64-nacl -o - -emit-llvm %s | \
66 // RUN: FileCheck %s -check-prefix=X86_64-NACL
67 // X86_64-NACL: target datalayout = "e-m:e-p:32:32-i64:64-n8:16:32:64-S128"
68 
69 // RUN: %clang_cc1 -triple arm-nacl -o - -emit-llvm %s | \
70 // RUN: FileCheck %s -check-prefix=ARM-NACL
71 // ARM-NACL: target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S128"
72 
73 // RUN: %clang_cc1 -triple mipsel-nacl -o - -emit-llvm %s | \
74 // RUN: FileCheck %s -check-prefix=MIPS-NACL
75 // MIPS-NACL: target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
76 
77 // RUN: %clang_cc1 -triple le32-nacl -o - -emit-llvm %s | \
78 // RUN: FileCheck %s -check-prefix=LE32-NACL
79 // LE32-NACL: target datalayout = "e-p:32:32-i64:64"
80 
81 // RUN: %clang_cc1 -triple wasm32-unknown-unknown -o - -emit-llvm %s | \
82 // RUN: FileCheck %s -check-prefix=WEBASSEMBLY32
83 // WEBASSEMBLY32: target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
84 
85 // RUN: %clang_cc1 -triple wasm64-unknown-unknown -o - -emit-llvm %s | \
86 // RUN: FileCheck %s -check-prefix=WEBASSEMBLY64
87 // WEBASSEMBLY64: target datalayout = "e-m:e-p:64:64-i64:64-n32:64-S128"
88 
89 // RUN: %clang_cc1 -triple lanai-unknown-unknown -o - -emit-llvm %s | \
90 // RUN: FileCheck %s -check-prefix=LANAI
91 // LANAI: target datalayout = "E-m:e-p:32:32-i64:64-a:0:32-n32-S64"
92 
93 // RUN: %clang_cc1 -triple powerpc-unknown -o - -emit-llvm %s | \
94 // RUN: FileCheck %s -check-prefix=PPC
95 // PPC: target datalayout = "E-m:e-p:32:32-i64:64-n32"
96 
97 // RUN: %clang_cc1 -triple powerpc64-freebsd -o - -emit-llvm %s | \
98 // RUN: FileCheck %s -check-prefix=PPC64-FREEBSD
99 // PPC64-FREEBSD: target datalayout = "E-m:e-i64:64-n32:64"
100 
101 // RUN: %clang_cc1 -triple powerpc64-linux -o - -emit-llvm %s | \
102 // RUN: FileCheck %s -check-prefix=PPC64-LINUX
103 // PPC64-LINUX: target datalayout = "E-m:e-i64:64-n32:64"
104 
105 // RUN: %clang_cc1 -triple powerpc64le-linux -o - -emit-llvm %s | \
106 // RUN: FileCheck %s -check-prefix=PPC64LE-LINUX
107 // PPC64LE-LINUX: target datalayout = "e-m:e-i64:64-n32:64"
108 
109 // RUN: %clang_cc1 -triple powerpc-darwin -o - -emit-llvm %s | \
110 // RUN: FileCheck %s -check-prefix=PPC32-DARWIN
111 // PPC32-DARWIN: target datalayout = "E-m:o-p:32:32-f64:32:64-n32"
112 
113 // RUN: %clang_cc1 -triple powerpc64-darwin -o - -emit-llvm %s | \
114 // RUN: FileCheck %s -check-prefix=PPC64-DARWIN
115 // PPC64-DARWIN: target datalayout = "E-m:o-i64:64-n32:64"
116 
117 // RUN: %clang_cc1 -triple nvptx-unknown -o - -emit-llvm %s | \
118 // RUN: FileCheck %s -check-prefix=NVPTX
119 // NVPTX: target datalayout = "e-p:32:32-i64:64-v16:16-v32:32-n16:32:64"
120 
121 // RUN: %clang_cc1 -triple nvptx64-unknown -o - -emit-llvm %s | \
122 // RUN: FileCheck %s -check-prefix=NVPTX64
123 // NVPTX64: target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
124 
125 // RUN: %clang_cc1 -triple r600-unknown -o - -emit-llvm %s | \
126 // RUN: FileCheck %s -check-prefix=R600
127 // R600: target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
128 
129 // RUN: %clang_cc1 -triple r600-unknown -target-cpu cayman -o - -emit-llvm %s \
130 // RUN: | FileCheck %s -check-prefix=R600D
131 // R600D: target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
132 
133 // RUN: %clang_cc1 -triple amdgcn-unknown -target-cpu hawaii -o - -emit-llvm %s \
134 // RUN: | FileCheck %s -check-prefix=R600SI
135 // R600SI: target datalayout = "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
136 
137 // Test default -target-cpu
138 // RUN: %clang_cc1 -triple amdgcn-unknown -o - -emit-llvm %s \
139 // RUN: | FileCheck %s -check-prefix=R600SIDefault
140 // R600SIDefault: target datalayout = "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
141 
142 // RUN: %clang_cc1 -triple arm64-unknown -o - -emit-llvm %s | \
143 // RUN: FileCheck %s -check-prefix=AARCH64
144 // AARCH64: target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
145 
146 // RUN: %clang_cc1 -triple thumb-unknown-gnueabi -o - -emit-llvm %s | \
147 // RUN: FileCheck %s -check-prefix=THUMB
148 // THUMB: target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
149 
150 // RUN: %clang_cc1 -triple arm-unknown-gnueabi -o - -emit-llvm %s | \
151 // RUN: FileCheck %s -check-prefix=ARM
152 // ARM: target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
153 
154 // RUN: %clang_cc1 -triple thumb-unknown -o - -emit-llvm -target-abi apcs-gnu \
155 // RUN: %s | FileCheck %s -check-prefix=THUMB-GNU
156 // THUMB-GNU: target datalayout = "e-m:e-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
157 
158 // RUN: %clang_cc1 -triple arm-unknown -o - -emit-llvm -target-abi apcs-gnu \
159 // RUN: %s | FileCheck %s -check-prefix=ARM-GNU
160 // ARM-GNU: target datalayout = "e-m:e-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
161 
162 // RUN: %clang_cc1 -triple hexagon-unknown -o - -emit-llvm %s | \
163 // RUN: FileCheck %s -check-prefix=HEXAGON
164 // HEXAGON: target datalayout = "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048"
165 
166 // RUN: %clang_cc1 -triple s390x-unknown -o - -emit-llvm %s | \
167 // RUN: FileCheck %s -check-prefix=SYSTEMZ
168 // SYSTEMZ: target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64"
169 
170 // RUN: %clang_cc1 -triple s390x-unknown -target-cpu z13 -o - -emit-llvm %s | \
171 // RUN: FileCheck %s -check-prefix=SYSTEMZ-VECTOR
172 // SYSTEMZ-VECTOR: target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
173 
174 // RUN: %clang_cc1 -triple msp430-unknown -o - -emit-llvm %s | \
175 // RUN: FileCheck %s -check-prefix=MSP430
176 // MSP430: target datalayout = "e-m:e-p:16:16-i32:16:32-a:16-n8:16"
177 
178 // RUN: %clang_cc1 -triple tce-unknown -o - -emit-llvm %s | \
179 // RUN: FileCheck %s -check-prefix=TCE
180 // TCE: target datalayout = "E-p:32:32-i8:8:32-i16:16:32-i64:32-f64:32-v64:32-v128:32-a:0:32-n32"
181 
182 // RUN: %clang_cc1 -triple spir-unknown -o - -emit-llvm %s | \
183 // RUN: FileCheck %s -check-prefix=SPIR
184 // SPIR: target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
185 
186 // RUN: %clang_cc1 -triple spir64-unknown -o - -emit-llvm %s | \
187 // RUN: FileCheck %s -check-prefix=SPIR64
188 // SPIR64: target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
189 
190 // RUN: %clang_cc1 -triple bpfel -o - -emit-llvm %s | \
191 // RUN: FileCheck %s -check-prefix=BPFEL
192 // BPFEL: target datalayout = "e-m:e-p:64:64-i64:64-n32:64-S128"
193 
194 // RUN: %clang_cc1 -triple bpfeb -o - -emit-llvm %s | \
195 // RUN: FileCheck %s -check-prefix=BPFEB
196 // BPFEB: target datalayout = "E-m:e-p:64:64-i64:64-n32:64-S128"
197