blob: 59112a0baf4a7db93cb188aca7e284fc9458cd11 [file] [log] [blame]
Ulrich Weigand8afad612014-07-28 13:17:52 +00001// REQUIRES: powerpc-registered-target
2
3// Verify ABI selection by the front end
4
5// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s \
6// RUN: | FileCheck %s --check-prefix=CHECK-ELFv1
7// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s \
8// RUN: -target-abi elfv1 | FileCheck %s --check-prefix=CHECK-ELFv1
9// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s \
Hal Finkel0d0a1a52015-03-11 19:14:15 +000010// RUN: -target-abi elfv1-qpx | FileCheck %s --check-prefix=CHECK-ELFv1
11// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s \
Ulrich Weigand8afad612014-07-28 13:17:52 +000012// RUN: -target-abi elfv2 | FileCheck %s --check-prefix=CHECK-ELFv2
13// RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu -emit-llvm -o - %s \
14// RUN: | FileCheck %s --check-prefix=CHECK-ELFv2
15// RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu -emit-llvm -o - %s \
16// RUN: -target-abi elfv1 | FileCheck %s --check-prefix=CHECK-ELFv1
17// RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu -emit-llvm -o - %s \
18// RUN: -target-abi elfv2 | FileCheck %s --check-prefix=CHECK-ELFv2
19
20// CHECK-ELFv1: define void @func_fab(%struct.fab* noalias sret %agg.result, i64 %x.coerce)
21// CHECK-ELFv2: define [2 x float] @func_fab([2 x float] %x.coerce)
22struct fab { float a; float b; };
23struct fab func_fab(struct fab x) { return x; }