]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/nvptx-abi.c
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
[FreeBSD/FreeBSD.git] / test / CodeGen / nvptx-abi.c
1 // RUN: %clang_cc1 -triple nvptx-unknown-unknown -S -o - %s -emit-llvm | FileCheck %s
2 // RUN: %clang_cc1 -triple nvptx64-unknown-unknown -S -o - %s -emit-llvm | FileCheck %s
3
4 typedef struct float4_s {
5   float x, y, z, w;
6 } float4_t;
7
8 float4_t my_function(void);
9
10 // CHECK-DAG: declare %struct.float4_s @my_function
11
12 float bar(void) {
13   float4_t ret;
14 // CHECK-DAG: call %struct.float4_s @my_function
15   ret = my_function();
16   return ret.x;
17 }