2013-12-14 04:11:02 +08:00
|
|
|
// RUN: %clang_cc1 -triple i686-unknown-unknown -emit-llvm -o - %s | \
|
|
|
|
// RUN: FileCheck --check-prefix=I686-UNKNOWN %s
|
2019-09-11 07:15:38 +08:00
|
|
|
// I686-UNKNOWN: target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128"
|
2013-12-14 04:11:02 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple i686-apple-darwin9 -emit-llvm -o - %s | \
|
|
|
|
// RUN: FileCheck --check-prefix=I686-DARWIN %s
|
2019-09-11 07:15:38 +08:00
|
|
|
// I686-DARWIN: target datalayout = "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:128-n8:16:32-S128"
|
2013-12-14 04:11:02 +08:00
|
|
|
|
2013-12-16 01:53:44 +08:00
|
|
|
// RUN: %clang_cc1 -triple i686-unknown-win32 -emit-llvm -o - %s | \
|
|
|
|
// RUN: FileCheck --check-prefix=I686-WIN32 %s
|
2022-01-23 09:14:58 +08:00
|
|
|
// I686-WIN32: target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32-a:0:32-S32"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple i686-unknown-cygwin -emit-llvm -o - %s | \
|
|
|
|
// RUN: FileCheck --check-prefix=I686-CYGWIN %s
|
2019-09-11 07:15:38 +08:00
|
|
|
// I686-CYGWIN: target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
2020-07-22 03:58:17 +08:00
|
|
|
// RUN: %clang_cc1 -triple i686-pc-macho -emit-llvm -o - %s | \
|
|
|
|
// RUN: FileCheck --check-prefix=I686-MACHO %s
|
|
|
|
// I686-MACHO: target datalayout = "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128"
|
|
|
|
|
2013-12-14 04:11:02 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | \
|
|
|
|
// RUN: FileCheck --check-prefix=X86_64 %s
|
2019-09-11 07:15:38 +08:00
|
|
|
// X86_64: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
2013-12-14 05:49:53 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple xcore-unknown-unknown -emit-llvm -o - %s | \
|
|
|
|
// RUN: FileCheck --check-prefix=XCORE %s
|
2014-01-04 03:22:05 +08:00
|
|
|
// 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"
|
2013-12-14 05:49:53 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple sparc-sun-solaris -emit-llvm -o - %s | \
|
|
|
|
// RUN: FileCheck %s --check-prefix=SPARC-V8
|
2014-01-04 03:22:05 +08:00
|
|
|
// SPARC-V8: target datalayout = "E-m:e-p:32:32-i64:64-f128:64-n32-S64"
|
2013-12-14 05:49:53 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple sparcv9-sun-solaris -emit-llvm -o - %s | \
|
|
|
|
// RUN: FileCheck %s --check-prefix=SPARC-V9
|
2014-01-04 03:22:05 +08:00
|
|
|
// SPARC-V9: target datalayout = "E-m:e-i64:64-n32:64-S128"
|
2013-12-14 05:49:53 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple mipsel-linux-gnu -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=MIPS-32EL
|
2018-10-16 22:29:27 +08:00
|
|
|
// RUN: %clang_cc1 -triple mipsisa32r6el-linux-gnu -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=MIPS-32EL
|
2014-01-04 03:22:05 +08:00
|
|
|
// MIPS-32EL: target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
|
2013-12-14 05:49:53 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple mips-linux-gnu -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=MIPS-32EB
|
2018-10-16 22:29:27 +08:00
|
|
|
// RUN: %clang_cc1 -triple mipsisa32r6-linux-gnu -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=MIPS-32EB
|
2014-01-04 03:22:05 +08:00
|
|
|
// MIPS-32EB: target datalayout = "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
|
2013-12-14 05:49:53 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple mips64el-linux-gnu -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=MIPS-64EL
|
2018-10-16 06:43:23 +08:00
|
|
|
// RUN: %clang_cc1 -triple mips64el-linux-gnuabi64 -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=MIPS-64EL
|
2018-10-16 22:29:27 +08:00
|
|
|
// RUN: %clang_cc1 -triple mipsisa64r6el-linux-gnu -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=MIPS-64EL
|
|
|
|
// RUN: %clang_cc1 -triple mipsisa64r6el-linux-gnuabi64 -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=MIPS-64EL
|
2018-10-16 13:18:36 +08:00
|
|
|
// MIPS-64EL: target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128"
|
2018-10-16 06:43:23 +08:00
|
|
|
|
2013-12-16 01:53:44 +08:00
|
|
|
// RUN: %clang_cc1 -triple mips64el-linux-gnu -o - -emit-llvm -target-abi n32 \
|
|
|
|
// RUN: %s | FileCheck %s -check-prefix=MIPS-64EL-N32
|
2018-10-16 06:43:23 +08:00
|
|
|
// RUN: %clang_cc1 -triple mips64el-linux-gnuabin32 -o - -emit-llvm \
|
|
|
|
// RUN: %s | FileCheck %s -check-prefix=MIPS-64EL-N32
|
2018-10-16 22:29:27 +08:00
|
|
|
// RUN: %clang_cc1 -triple mipsisa64r6el-linux-gnu -o - -emit-llvm -target-abi n32 \
|
|
|
|
// RUN: %s | FileCheck %s -check-prefix=MIPS-64EL-N32
|
|
|
|
// RUN: %clang_cc1 -triple mipsisa64r6el-linux-gnuabin32 -o - -emit-llvm \
|
|
|
|
// RUN: %s | FileCheck %s -check-prefix=MIPS-64EL-N32
|
2018-10-16 13:18:36 +08:00
|
|
|
// MIPS-64EL-N32: target datalayout = "e-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-n32:64-S128"
|
2018-10-16 06:43:23 +08:00
|
|
|
|
2013-12-14 05:49:53 +08:00
|
|
|
// RUN: %clang_cc1 -triple mips64-linux-gnu -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=MIPS-64EB
|
2018-10-16 06:43:23 +08:00
|
|
|
// RUN: %clang_cc1 -triple mips64-linux-gnuabi64 -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=MIPS-64EB
|
2018-10-16 22:29:27 +08:00
|
|
|
// RUN: %clang_cc1 -triple mipsisa64r6-linux-gnu -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=MIPS-64EB
|
|
|
|
// RUN: %clang_cc1 -triple mipsisa64r6-linux-gnuabi64 -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=MIPS-64EB
|
2018-10-16 13:18:36 +08:00
|
|
|
// MIPS-64EB: target datalayout = "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128"
|
2018-10-16 06:43:23 +08:00
|
|
|
|
2013-12-16 01:53:44 +08:00
|
|
|
// RUN: %clang_cc1 -triple mips64-linux-gnu -o - -emit-llvm %s -target-abi n32 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=MIPS-64EB-N32
|
2018-10-16 06:43:23 +08:00
|
|
|
// RUN: %clang_cc1 -triple mips64-linux-gnuabin32 -o - -emit-llvm %s \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=MIPS-64EB-N32
|
2018-10-16 22:29:27 +08:00
|
|
|
// RUN: %clang_cc1 -triple mipsisa64r6-linux-gnu -o - -emit-llvm %s -target-abi n32 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=MIPS-64EB-N32
|
|
|
|
// RUN: %clang_cc1 -triple mipsisa64r6-linux-gnuabin32 -o - -emit-llvm %s \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=MIPS-64EB-N32
|
2018-10-16 13:18:36 +08:00
|
|
|
// MIPS-64EB-N32: target datalayout = "E-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-n32:64-S128"
|
2018-10-16 06:43:23 +08:00
|
|
|
|
2013-12-16 01:53:44 +08:00
|
|
|
// RUN: %clang_cc1 -triple powerpc64-lv2 -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=PS3
|
2014-01-04 03:22:05 +08:00
|
|
|
// PS3: target datalayout = "E-m:e-p:32:32-i64:64-n32:64"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple i686-nacl -o - -emit-llvm %s | \
|
2013-12-18 12:35:56 +08:00
|
|
|
// RUN: FileCheck %s -check-prefix=I686-NACL
|
2019-09-11 07:15:38 +08:00
|
|
|
// I686-NACL: target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-n8:16:32-S128"
|
2013-12-18 12:35:56 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple x86_64-nacl -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=X86_64-NACL
|
2019-09-11 07:15:38 +08:00
|
|
|
// X86_64-NACL: target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-n8:16:32:64-S128"
|
2013-12-18 12:35:56 +08:00
|
|
|
|
2015-03-31 04:31:33 +08:00
|
|
|
// RUN: %clang_cc1 -triple arm-nacl -o - -emit-llvm %s | \
|
2013-12-18 12:35:56 +08:00
|
|
|
// RUN: FileCheck %s -check-prefix=ARM-NACL
|
2019-03-08 18:44:06 +08:00
|
|
|
// ARM-NACL: target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S128"
|
2013-12-18 12:35:56 +08:00
|
|
|
|
2013-12-19 06:40:42 +08:00
|
|
|
// RUN: %clang_cc1 -triple mipsel-nacl -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=MIPS-NACL
|
2014-01-04 03:22:05 +08:00
|
|
|
// MIPS-NACL: target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
|
2013-12-19 06:40:42 +08:00
|
|
|
|
2015-09-04 06:51:53 +08:00
|
|
|
// RUN: %clang_cc1 -triple wasm32-unknown-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=WEBASSEMBLY32
|
2021-10-07 18:10:52 +08:00
|
|
|
// WEBASSEMBLY32: target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
|
2015-09-04 06:51:53 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple wasm64-unknown-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=WEBASSEMBLY64
|
2021-10-07 18:10:52 +08:00
|
|
|
// WEBASSEMBLY64: target datalayout = "e-m:e-p:64:64-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
|
2015-09-04 06:51:53 +08:00
|
|
|
|
2016-03-29 05:02:54 +08:00
|
|
|
// RUN: %clang_cc1 -triple lanai-unknown-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=LANAI
|
|
|
|
// LANAI: target datalayout = "E-m:e-p:32:32-i64:64-a:0:32-n32-S64"
|
|
|
|
|
2013-12-16 01:53:44 +08:00
|
|
|
// RUN: %clang_cc1 -triple powerpc-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=PPC
|
2014-01-04 03:22:05 +08:00
|
|
|
// PPC: target datalayout = "E-m:e-p:32:32-i64:64-n32"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
2021-01-03 02:17:58 +08:00
|
|
|
// RUN: %clang_cc1 -triple powerpcle-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=PPCLE
|
|
|
|
// PPCLE: target datalayout = "e-m:e-p:32:32-i64:64-n32"
|
|
|
|
|
2013-12-16 01:53:44 +08:00
|
|
|
// RUN: %clang_cc1 -triple powerpc64-freebsd -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=PPC64-FREEBSD
|
2014-01-04 03:22:05 +08:00
|
|
|
// PPC64-FREEBSD: target datalayout = "E-m:e-i64:64-n32:64"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
2020-08-29 18:02:51 +08:00
|
|
|
// RUN: %clang_cc1 -triple powerpc64le-freebsd -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=PPC64LE-FREEBSD
|
|
|
|
// PPC64LE-FREEBSD: target datalayout = "e-m:e-i64:64-n32:64"
|
|
|
|
|
2013-12-16 01:53:44 +08:00
|
|
|
// RUN: %clang_cc1 -triple powerpc64-linux -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=PPC64-LINUX
|
2021-02-08 22:36:20 +08:00
|
|
|
// PPC64-LINUX: target datalayout = "E-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512"
|
2020-09-29 03:12:14 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple powerpc64-linux -o - -emit-llvm -target-cpu future %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=PPC64-FUTURE
|
2021-02-08 22:36:20 +08:00
|
|
|
// PPC64-FUTURE: target datalayout = "E-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512"
|
2020-09-29 03:12:14 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple powerpc64-linux -o - -emit-llvm -target-cpu pwr10 %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=PPC64-P10
|
2021-02-08 22:36:20 +08:00
|
|
|
// PPC64-P10: target datalayout = "E-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
2014-03-24 23:48:02 +08:00
|
|
|
// RUN: %clang_cc1 -triple powerpc64le-linux -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=PPC64LE-LINUX
|
2021-02-08 22:36:20 +08:00
|
|
|
// PPC64LE-LINUX: target datalayout = "e-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512"
|
2020-09-29 03:12:14 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple powerpc64le-linux -o - -emit-llvm -target-cpu future %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=PPC64LE-FUTURE
|
2021-02-08 22:36:20 +08:00
|
|
|
// PPC64LE-FUTURE: target datalayout = "e-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512"
|
2020-09-29 03:12:14 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple powerpc64le-linux -o - -emit-llvm -target-cpu pwr10 %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=PPC64LE-P10
|
2021-02-08 22:36:20 +08:00
|
|
|
// PPC64LE-P10: target datalayout = "e-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512"
|
2014-03-24 23:48:02 +08:00
|
|
|
|
2013-12-16 01:53:44 +08:00
|
|
|
// RUN: %clang_cc1 -triple nvptx-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=NVPTX
|
2017-07-21 05:16:03 +08:00
|
|
|
// NVPTX: target datalayout = "e-p:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple nvptx64-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=NVPTX64
|
2017-07-21 05:16:03 +08:00
|
|
|
// NVPTX64: target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple r600-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=R600
|
2020-07-22 21:41:06 +08:00
|
|
|
// 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"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple r600-unknown -target-cpu cayman -o - -emit-llvm %s \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=R600D
|
2020-07-22 21:41:06 +08:00
|
|
|
// 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"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
2015-01-07 04:34:47 +08:00
|
|
|
// RUN: %clang_cc1 -triple amdgcn-unknown -target-cpu hawaii -o - -emit-llvm %s \
|
2013-12-16 01:53:44 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=R600SI
|
2020-07-22 21:41:06 +08:00
|
|
|
// 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-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"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
2015-01-28 23:38:44 +08:00
|
|
|
// Test default -target-cpu
|
|
|
|
// RUN: %clang_cc1 -triple amdgcn-unknown -o - -emit-llvm %s \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=R600SIDefault
|
2020-07-22 21:41:06 +08:00
|
|
|
// 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-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"
|
2015-01-28 23:38:44 +08:00
|
|
|
|
2014-04-30 18:52:05 +08:00
|
|
|
// RUN: %clang_cc1 -triple arm64-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=AARCH64
|
2016-07-08 04:02:25 +08:00
|
|
|
// AARCH64: target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
2018-09-18 17:34:39 +08:00
|
|
|
// RUN: %clang_cc1 -triple arm64_32-apple-ios7.0 -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=AARCH64-ILP32
|
|
|
|
// AARCH64-ILP32: target datalayout = "e-m:o-p:32:32-i64:64-i128:128-n32:64-S128"
|
|
|
|
|
2020-11-11 10:36:10 +08:00
|
|
|
// RUN: %clang_cc1 -triple arm64-pc-win32-macho -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=AARCH64-WIN32-MACHO
|
|
|
|
// AARCH64-WIN32-MACHO: target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
|
|
|
|
|
2013-12-18 05:01:22 +08:00
|
|
|
// RUN: %clang_cc1 -triple thumb-unknown-gnueabi -o - -emit-llvm %s | \
|
2013-12-16 01:53:44 +08:00
|
|
|
// RUN: FileCheck %s -check-prefix=THUMB
|
2019-03-08 18:44:06 +08:00
|
|
|
// THUMB: target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
2013-12-18 05:01:22 +08:00
|
|
|
// RUN: %clang_cc1 -triple arm-unknown-gnueabi -o - -emit-llvm %s | \
|
2013-12-16 01:53:44 +08:00
|
|
|
// RUN: FileCheck %s -check-prefix=ARM
|
2019-03-08 18:44:06 +08:00
|
|
|
// ARM: target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple thumb-unknown -o - -emit-llvm -target-abi apcs-gnu \
|
|
|
|
// RUN: %s | FileCheck %s -check-prefix=THUMB-GNU
|
2019-03-08 18:44:06 +08:00
|
|
|
// 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"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple arm-unknown -o - -emit-llvm -target-abi apcs-gnu \
|
|
|
|
// RUN: %s | FileCheck %s -check-prefix=ARM-GNU
|
2019-03-08 18:44:06 +08:00
|
|
|
// 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"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
2018-11-28 03:52:10 +08:00
|
|
|
// RUN: %clang_cc1 -triple arc-unknown-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=ARC
|
|
|
|
// 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"
|
|
|
|
|
2013-12-16 01:53:44 +08:00
|
|
|
// RUN: %clang_cc1 -triple hexagon-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=HEXAGON
|
2016-02-12 22:48:34 +08:00
|
|
|
// 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"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
2020-02-06 04:08:19 +08:00
|
|
|
// RUN: %clang_cc1 -triple s390x-unknown -target-cpu z10 -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=SYSTEMZ
|
2020-01-04 07:39:07 +08:00
|
|
|
// RUN: %clang_cc1 -triple s390x-unknown -target-cpu z13 -target-feature +soft-float -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=SYSTEMZ
|
2014-01-04 03:22:05 +08:00
|
|
|
// SYSTEMZ: target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
2015-05-06 03:35:52 +08:00
|
|
|
// RUN: %clang_cc1 -triple s390x-unknown -target-cpu z13 -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=SYSTEMZ-VECTOR
|
|
|
|
// SYSTEMZ-VECTOR: target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
|
|
|
|
|
2021-09-25 02:05:55 +08:00
|
|
|
// RUN: %clang_cc1 -triple s390x-none-zos -target-cpu z10 -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=ZOS
|
|
|
|
// RUN: %clang_cc1 -triple s390x-none-zos -target-cpu z13 -target-feature +soft-float -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=ZOS
|
|
|
|
// RUN: %clang_cc1 -triple s390x-none-zos -target-cpu z13 -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=ZOS
|
|
|
|
// ZOS: target datalayout = "E-m:l-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
|
|
|
|
|
2013-12-16 01:53:44 +08:00
|
|
|
// RUN: %clang_cc1 -triple msp430-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=MSP430
|
2017-06-24 05:12:56 +08:00
|
|
|
// MSP430: target datalayout = "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple tce-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=TCE
|
2016-11-17 00:21:59 +08:00
|
|
|
// 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"
|
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple tcele-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=TCELE
|
|
|
|
// 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"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple spir-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=SPIR
|
2013-12-17 07:27:41 +08:00
|
|
|
// 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"
|
2013-12-16 01:53:44 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple spir64-unknown -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=SPIR64
|
2013-12-17 07:27:41 +08:00
|
|
|
// SPIR64: target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
|
2015-06-11 06:59:13 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple bpfel -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=BPFEL
|
[BPF] support 128bit int explicitly in layout spec
Currently, bpf does not specify 128bit alignment in its
layout spec. So for a structure like
struct ipv6_key_t {
unsigned pid;
unsigned __int128 saddr;
unsigned short lport;
};
clang will generate IR type
%struct.ipv6_key_t = type { i32, [12 x i8], i128, i16, [14 x i8] }
Additional padding is to ensure later IR->MIR can generate correct
stack layout with target layout spec.
But it is common practice for a tracing program to be
first compiled with target flag (e.g., x86_64 or aarch64) through
clang to generate IR and then go through llc to generate bpf
byte code. Tracing program often refers to kernel internal
data structures which needs to be compiled with non-bpf target.
But such a compilation model may cause a problem on aarch64.
The bcc issue https://github.com/iovisor/bcc/issues/2827
reported such a problem.
For the above structure, since aarch64 has "i128:128" in its
layout string, the generated IR will have
%struct.ipv6_key_t = type { i32, i128, i16 }
Since bpf does not have "i128:128" in its spec string,
the selectionDAG assumes alignment 8 for i128 and
computes the stack storage size for the above is 32 bytes,
which leads incorrect code later.
The x86_64 does not have this issue as it does not have
"i128:128" in its layout spec as it does permits i128 to
be alignmented at 8 bytes at stack. Its IR type looks like
%struct.ipv6_key_t = type { i32, [12 x i8], i128, i16, [14 x i8] }
The fix here is add i128 support in layout spec, the same as
aarch64. The only downside is we may have less optimal stack
allocation in certain cases since we require 16byte alignment
for i128 instead of 8. But this is probably fine as i128 is
not used widely and in most cases users should already
have proper alignment.
Differential Revision: https://reviews.llvm.org/D76587
2020-03-22 13:54:20 +08:00
|
|
|
// BPFEL: target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
|
2015-06-11 06:59:13 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple bpfeb -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=BPFEB
|
[BPF] support 128bit int explicitly in layout spec
Currently, bpf does not specify 128bit alignment in its
layout spec. So for a structure like
struct ipv6_key_t {
unsigned pid;
unsigned __int128 saddr;
unsigned short lport;
};
clang will generate IR type
%struct.ipv6_key_t = type { i32, [12 x i8], i128, i16, [14 x i8] }
Additional padding is to ensure later IR->MIR can generate correct
stack layout with target layout spec.
But it is common practice for a tracing program to be
first compiled with target flag (e.g., x86_64 or aarch64) through
clang to generate IR and then go through llc to generate bpf
byte code. Tracing program often refers to kernel internal
data structures which needs to be compiled with non-bpf target.
But such a compilation model may cause a problem on aarch64.
The bcc issue https://github.com/iovisor/bcc/issues/2827
reported such a problem.
For the above structure, since aarch64 has "i128:128" in its
layout string, the generated IR will have
%struct.ipv6_key_t = type { i32, i128, i16 }
Since bpf does not have "i128:128" in its spec string,
the selectionDAG assumes alignment 8 for i128 and
computes the stack storage size for the above is 32 bytes,
which leads incorrect code later.
The x86_64 does not have this issue as it does not have
"i128:128" in its layout spec as it does permits i128 to
be alignmented at 8 bytes at stack. Its IR type looks like
%struct.ipv6_key_t = type { i32, [12 x i8], i128, i16, [14 x i8] }
The fix here is add i128 support in layout spec, the same as
aarch64. The only downside is we may have less optimal stack
allocation in certain cases since we require 16byte alignment
for i128 instead of 8. But this is probably fine as i128 is
not used widely and in most cases users should already
have proper alignment.
Differential Revision: https://reviews.llvm.org/D76587
2020-03-22 13:54:20 +08:00
|
|
|
// BPFEB: target datalayout = "E-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
|
2020-07-06 15:46:52 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -triple ve -o - -emit-llvm %s | \
|
|
|
|
// RUN: FileCheck %s -check-prefix=VE
|
2020-11-28 10:58:44 +08:00
|
|
|
// 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"
|