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-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128"
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-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:128-n8:16:32-S128"
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-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32-a:0:32-S32"
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-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32"
17 // RUN: %clang_cc1 -triple i686-pc-macho -emit-llvm -o - %s | \
18 // RUN: FileCheck --check-prefix=I686-MACHO %s
19 // I686-MACHO: target datalayout = "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128"
21 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | \
22 // RUN: FileCheck --check-prefix=X86_64 %s
23 // X86_64: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
25 // RUN: %clang_cc1 -triple xcore-unknown-unknown -emit-llvm -o - %s | \
26 // RUN: FileCheck --check-prefix=XCORE %s
27 // 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"
29 // RUN: %clang_cc1 -triple sparc-sun-solaris -emit-llvm -o - %s | \
30 // RUN: FileCheck %s --check-prefix=SPARC-V8
31 // SPARC-V8: target datalayout = "E-m:e-p:32:32-i64:64-i128:128-f128:64-n32-S64"
33 // RUN: %clang_cc1 -triple sparcv9-sun-solaris -emit-llvm -o - %s | \
34 // RUN: FileCheck %s --check-prefix=SPARC-V9
35 // SPARC-V9: target datalayout = "E-m:e-i64:64-i128:128-n32:64-S128"
37 // RUN: %clang_cc1 -triple mipsel-linux-gnu -o - -emit-llvm %s | \
38 // RUN: FileCheck %s -check-prefix=MIPS-32EL
39 // RUN: %clang_cc1 -triple mipsisa32r6el-linux-gnu -o - -emit-llvm %s | \
40 // RUN: FileCheck %s -check-prefix=MIPS-32EL
41 // MIPS-32EL: target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
43 // RUN: %clang_cc1 -triple mips-linux-gnu -o - -emit-llvm %s | \
44 // RUN: FileCheck %s -check-prefix=MIPS-32EB
45 // RUN: %clang_cc1 -triple mipsisa32r6-linux-gnu -o - -emit-llvm %s | \
46 // RUN: FileCheck %s -check-prefix=MIPS-32EB
47 // MIPS-32EB: target datalayout = "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
49 // RUN: %clang_cc1 -triple mips64el-linux-gnu -o - -emit-llvm %s | \
50 // RUN: FileCheck %s -check-prefix=MIPS-64EL
51 // RUN: %clang_cc1 -triple mips64el-linux-gnuabi64 -o - -emit-llvm %s | \
52 // RUN: FileCheck %s -check-prefix=MIPS-64EL
53 // RUN: %clang_cc1 -triple mipsisa64r6el-linux-gnu -o - -emit-llvm %s | \
54 // RUN: FileCheck %s -check-prefix=MIPS-64EL
55 // RUN: %clang_cc1 -triple mipsisa64r6el-linux-gnuabi64 -o - -emit-llvm %s | \
56 // RUN: FileCheck %s -check-prefix=MIPS-64EL
57 // MIPS-64EL: target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
59 // RUN: %clang_cc1 -triple mips64el-linux-gnu -o - -emit-llvm -target-abi n32 \
60 // RUN: %s | FileCheck %s -check-prefix=MIPS-64EL-N32
61 // RUN: %clang_cc1 -triple mips64el-linux-gnuabin32 -o - -emit-llvm \
62 // RUN: %s | FileCheck %s -check-prefix=MIPS-64EL-N32
63 // RUN: %clang_cc1 -triple mipsisa64r6el-linux-gnu -o - -emit-llvm -target-abi n32 \
64 // RUN: %s | FileCheck %s -check-prefix=MIPS-64EL-N32
65 // RUN: %clang_cc1 -triple mipsisa64r6el-linux-gnuabin32 -o - -emit-llvm \
66 // RUN: %s | FileCheck %s -check-prefix=MIPS-64EL-N32
67 // MIPS-64EL-N32: target datalayout = "e-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
69 // RUN: %clang_cc1 -triple mips64-linux-gnu -o - -emit-llvm %s | \
70 // RUN: FileCheck %s -check-prefix=MIPS-64EB
71 // RUN: %clang_cc1 -triple mips64-linux-gnuabi64 -o - -emit-llvm %s | \
72 // RUN: FileCheck %s -check-prefix=MIPS-64EB
73 // RUN: %clang_cc1 -triple mipsisa64r6-linux-gnu -o - -emit-llvm %s | \
74 // RUN: FileCheck %s -check-prefix=MIPS-64EB
75 // RUN: %clang_cc1 -triple mipsisa64r6-linux-gnuabi64 -o - -emit-llvm %s | \
76 // RUN: FileCheck %s -check-prefix=MIPS-64EB
77 // MIPS-64EB: target datalayout = "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
79 // RUN: %clang_cc1 -triple mips64-linux-gnu -o - -emit-llvm %s -target-abi n32 \
80 // RUN: | FileCheck %s -check-prefix=MIPS-64EB-N32
81 // RUN: %clang_cc1 -triple mips64-linux-gnuabin32 -o - -emit-llvm %s \
82 // RUN: | FileCheck %s -check-prefix=MIPS-64EB-N32
83 // RUN: %clang_cc1 -triple mipsisa64r6-linux-gnu -o - -emit-llvm %s -target-abi n32 \
84 // RUN: | FileCheck %s -check-prefix=MIPS-64EB-N32
85 // RUN: %clang_cc1 -triple mipsisa64r6-linux-gnuabin32 -o - -emit-llvm %s \
86 // RUN: | FileCheck %s -check-prefix=MIPS-64EB-N32
87 // MIPS-64EB-N32: target datalayout = "E-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
89 // RUN: %clang_cc1 -triple powerpc64-lv2 -o - -emit-llvm %s | \
90 // RUN: FileCheck %s -check-prefix=PS3
91 // PS3: target datalayout = "E-m:e-p:32:32-Fi64-i64:64-n32:64"
93 // RUN: %clang_cc1 -triple i686-nacl -o - -emit-llvm %s | \
94 // RUN: FileCheck %s -check-prefix=I686-NACL
95 // I686-NACL: target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n8:16:32-S128"
97 // RUN: %clang_cc1 -triple x86_64-nacl -o - -emit-llvm %s | \
98 // RUN: FileCheck %s -check-prefix=X86_64-NACL
99 // X86_64-NACL: target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n8:16:32:64-S128"
101 // RUN: %clang_cc1 -triple arm-nacl -o - -emit-llvm %s | \
102 // RUN: FileCheck %s -check-prefix=ARM-NACL
103 // ARM-NACL: target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S128"
105 // RUN: %clang_cc1 -triple mipsel-nacl -o - -emit-llvm %s | \
106 // RUN: FileCheck %s -check-prefix=MIPS-NACL
107 // MIPS-NACL: target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
109 // RUN: %clang_cc1 -triple wasm32-unknown-unknown -o - -emit-llvm %s | \
110 // RUN: FileCheck %s -check-prefix=WEBASSEMBLY32
111 // WEBASSEMBLY32: target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
113 // RUN: %clang_cc1 -triple wasm64-unknown-unknown -o - -emit-llvm %s | \
114 // RUN: FileCheck %s -check-prefix=WEBASSEMBLY64
115 // WEBASSEMBLY64: target datalayout = "e-m:e-p:64:64-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
117 // RUN: %clang_cc1 -triple lanai-unknown-unknown -o - -emit-llvm %s | \
118 // RUN: FileCheck %s -check-prefix=LANAI
119 // LANAI: target datalayout = "E-m:e-p:32:32-i64:64-a:0:32-n32-S64"
121 // RUN: %clang_cc1 -triple powerpc-unknown -o - -emit-llvm %s | \
122 // RUN: FileCheck %s -check-prefix=PPC
123 // PPC: target datalayout = "E-m:e-p:32:32-Fn32-i64:64-n32"
125 // RUN: %clang_cc1 -triple powerpcle-unknown -o - -emit-llvm %s | \
126 // RUN: FileCheck %s -check-prefix=PPCLE
127 // PPCLE: target datalayout = "e-m:e-p:32:32-Fn32-i64:64-n32"
129 // RUN: %clang_cc1 -triple powerpc64-freebsd -o - -emit-llvm %s | \
130 // RUN: FileCheck %s -check-prefix=PPC64-FREEBSD
131 // PPC64-FREEBSD: target datalayout = "E-m:e-Fn32-i64:64-n32:64"
133 // RUN: %clang_cc1 -triple powerpc64le-freebsd -o - -emit-llvm %s | \
134 // RUN: FileCheck %s -check-prefix=PPC64LE-FREEBSD
135 // PPC64LE-FREEBSD: target datalayout = "e-m:e-Fn32-i64:64-n32:64"
137 // RUN: %clang_cc1 -triple powerpc64-linux -o - -emit-llvm %s | \
138 // RUN: FileCheck %s -check-prefix=PPC64-LINUX
139 // PPC64-LINUX: target datalayout = "E-m:e-Fi64-i64:64-n32:64-S128-v256:256:256-v512:512:512"
141 // RUN: %clang_cc1 -triple powerpc64-linux -o - -emit-llvm -target-cpu future %s | \
142 // RUN: FileCheck %s -check-prefix=PPC64-FUTURE
143 // PPC64-FUTURE: target datalayout = "E-m:e-Fi64-i64:64-n32:64-S128-v256:256:256-v512:512:512"
145 // RUN: %clang_cc1 -triple powerpc64-linux -o - -emit-llvm -target-cpu pwr10 %s | \
146 // RUN: FileCheck %s -check-prefix=PPC64-P10
147 // PPC64-P10: target datalayout = "E-m:e-Fi64-i64:64-n32:64-S128-v256:256:256-v512:512:512"
149 // RUN: %clang_cc1 -triple powerpc64le-linux -o - -emit-llvm %s | \
150 // RUN: FileCheck %s -check-prefix=PPC64LE-LINUX
151 // PPC64LE-LINUX: target datalayout = "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512"
153 // RUN: %clang_cc1 -triple powerpc64le-linux -o - -emit-llvm -target-cpu future %s | \
154 // RUN: FileCheck %s -check-prefix=PPC64LE-FUTURE
155 // PPC64LE-FUTURE: target datalayout = "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512"
157 // RUN: %clang_cc1 -triple powerpc64le-linux -o - -emit-llvm -target-cpu pwr10 %s | \
158 // RUN: FileCheck %s -check-prefix=PPC64LE-P10
159 // PPC64LE-P10: target datalayout = "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512"
161 // RUN: %clang_cc1 -triple nvptx-unknown -o - -emit-llvm %s | \
162 // RUN: FileCheck %s -check-prefix=NVPTX
163 // NVPTX: target datalayout = "e-p:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64"
165 // RUN: %clang_cc1 -triple nvptx64-unknown -o - -emit-llvm %s | \
166 // RUN: FileCheck %s -check-prefix=NVPTX64
167 // NVPTX64: target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
169 // RUN: %clang_cc1 -triple r600-unknown -o - -emit-llvm %s | \
170 // RUN: FileCheck %s -check-prefix=R600
171 // 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-S32-A5-G1"
173 // RUN: %clang_cc1 -triple r600-unknown -target-cpu cayman -o - -emit-llvm %s \
174 // RUN: | FileCheck %s -check-prefix=R600D
175 // 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-S32-A5-G1"
177 // RUN: %clang_cc1 -triple amdgcn-unknown -target-cpu hawaii -o - -emit-llvm %s \
178 // RUN: | FileCheck %s -check-prefix=R600SI
179 // R600SI: target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-p9:192:256:256: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-S32-A5-G1-ni:7:8:9"
181 // Test default -target-cpu
182 // RUN: %clang_cc1 -triple amdgcn-unknown -o - -emit-llvm %s \
183 // RUN: | FileCheck %s -check-prefix=R600SIDefault
184 // R600SIDefault: target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-p9:192:256:256: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-S32-A5-G1-ni:7:8:9"
186 // RUN: %clang_cc1 -triple arm64-unknown -o - -emit-llvm %s | \
187 // RUN: FileCheck %s -check-prefix=AARCH64
188 // AARCH64: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
190 // RUN: %clang_cc1 -triple arm64_32-apple-ios7.0 -o - -emit-llvm %s | \
191 // RUN: FileCheck %s -check-prefix=AARCH64-ILP32
192 // AARCH64-ILP32: target datalayout = "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32"
194 // RUN: %clang_cc1 -triple arm64-pc-win32-macho -o - -emit-llvm %s | \
195 // RUN: FileCheck %s -check-prefix=AARCH64-WIN32-MACHO
196 // AARCH64-WIN32-MACHO: target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32"
198 // RUN: %clang_cc1 -triple thumb-unknown-gnueabi -o - -emit-llvm %s | \
199 // RUN: FileCheck %s -check-prefix=THUMB
200 // THUMB: target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
202 // RUN: %clang_cc1 -triple arm-unknown-gnueabi -o - -emit-llvm %s | \
203 // RUN: FileCheck %s -check-prefix=ARM
204 // ARM: target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
206 // RUN: %clang_cc1 -triple thumb-unknown -o - -emit-llvm -target-abi apcs-gnu \
207 // RUN: %s | FileCheck %s -check-prefix=THUMB-GNU
208 // THUMB-GNU: target datalayout = "e-m:e-p:32:32-Fi8-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
210 // RUN: %clang_cc1 -triple arm-unknown -o - -emit-llvm -target-abi apcs-gnu \
211 // RUN: %s | FileCheck %s -check-prefix=ARM-GNU
212 // ARM-GNU: target datalayout = "e-m:e-p:32:32-Fi8-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
214 // RUN: %clang_cc1 -triple arc-unknown-unknown -o - -emit-llvm %s | \
215 // RUN: FileCheck %s -check-prefix=ARC
216 // ARC: target datalayout = "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-f32:32:32-i64:32-f64:32-a:0:32-n32"
218 // RUN: %clang_cc1 -triple hexagon-unknown -o - -emit-llvm %s | \
219 // RUN: FileCheck %s -check-prefix=HEXAGON
220 // 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"
222 // RUN: %clang_cc1 -triple s390x-unknown -target-cpu z10 -o - -emit-llvm %s | \
223 // RUN: FileCheck %s -check-prefix=SYSTEMZ
224 // RUN: %clang_cc1 -triple s390x-unknown -target-cpu z13 -target-feature +soft-float -o - -emit-llvm %s | \
225 // RUN: FileCheck %s -check-prefix=SYSTEMZ
226 // SYSTEMZ: target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
228 // RUN: %clang_cc1 -triple s390x-unknown -target-cpu z13 -o - -emit-llvm %s | \
229 // RUN: FileCheck %s -check-prefix=SYSTEMZ-VECTOR
230 // SYSTEMZ-VECTOR: target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
232 // RUN: %clang_cc1 -triple s390x-none-zos -target-cpu z10 -o - -emit-llvm %s | \
233 // RUN: FileCheck %s -check-prefix=ZOS
234 // RUN: %clang_cc1 -triple s390x-none-zos -target-cpu z13 -target-feature +soft-float -o - -emit-llvm %s | \
235 // RUN: FileCheck %s -check-prefix=ZOS
236 // RUN: %clang_cc1 -triple s390x-none-zos -target-cpu z13 -o - -emit-llvm %s | \
237 // RUN: FileCheck %s -check-prefix=ZOS
238 // ZOS: target datalayout = "E-m:l-p1:32:32-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
240 // RUN: %clang_cc1 -triple msp430-unknown -o - -emit-llvm %s | \
241 // RUN: FileCheck %s -check-prefix=MSP430
242 // MSP430: target datalayout = "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16"
244 // RUN: %clang_cc1 -triple tce-unknown -o - -emit-llvm %s | \
245 // RUN: FileCheck %s -check-prefix=TCE
246 // TCE: target datalayout = "E-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:32-v128:32:32-v256:32:32-v512:32:32-v1024:32:32-a0:0:32-n32"
248 // RUN: %clang_cc1 -triple tcele-unknown -o - -emit-llvm %s | \
249 // RUN: FileCheck %s -check-prefix=TCELE
250 // TCELE: target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:32-v128:32:32-v256:32:32-v512:32:32-v1024:32:32-a0:0:32-n32"
252 // RUN: %clang_cc1 -triple spir-unknown -o - -emit-llvm %s | \
253 // RUN: FileCheck %s -check-prefix=SPIR
254 // 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-G1"
256 // RUN: %clang_cc1 -triple spir64-unknown -o - -emit-llvm %s | \
257 // RUN: FileCheck %s -check-prefix=SPIR64
258 // SPIR64: target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-G1"
260 // RUN: %clang_cc1 -triple bpfel -o - -emit-llvm %s | \
261 // RUN: FileCheck %s -check-prefix=BPFEL
262 // BPFEL: target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
264 // RUN: %clang_cc1 -triple bpfeb -o - -emit-llvm %s | \
265 // RUN: FileCheck %s -check-prefix=BPFEB
266 // BPFEB: target datalayout = "E-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
268 // RUN: %clang_cc1 -triple ve -o - -emit-llvm %s | \
269 // RUN: FileCheck %s -check-prefix=VE
270 // VE: target datalayout = "e-m:e-i64:64-n32:64-S128-v64:64:64-v128:64:64-v256:64:64-v512:64:64-v1024:64:64-v2048:64:64-v4096:64:64-v8192:64:64-v16384:64:64"
272 // RUN: %clang_cc1 -triple spirv64-amd-amdhsa -o - -emit-llvm %s | \
273 // RUN: FileCheck %s -check-prefix=AMDGPUSPIRV64
274 // AMDGPUSPIRV64: target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n32:64-S32-G1-P4-A0"