• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -triple i386-pc-elfiamcu -emit-llvm -o - %s | FileCheck %s
2 
3 // CHECK: target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:32-f64:32-f128:32-n8:16:32-a:0:32-S32"
4 // CHECK: target triple = "i386-pc-elfiamcu"
5 
6 void food(double *d);
7 void fooll(long long *ll);
8 void fooull(unsigned long long *ull);
9 void foold(long double *ld);
10 
11 // CHECK-LABEL: define void @testdouble()
12 // CHECK: alloca double, align 4
testdouble()13 void testdouble() {
14   double d = 2.0;
15   food(&d);
16 }
17 
18 // CHECK-LABEL: define void @testlonglong()
19 // CHECK: alloca i64, align 4
testlonglong()20 void testlonglong() {
21   long long ll = 2;
22   fooll(&ll);
23 }
24 
25 // CHECK-LABEL: define void @testunsignedlonglong()
26 // CHECK: alloca i64, align 4
testunsignedlonglong()27 void testunsignedlonglong() {
28   unsigned long long ull = 2;
29   fooull(&ull);
30 }
31 
32 // CHECK-LABEL: define void @testlongdouble()
33 // CHECK: alloca double, align 4
testlongdouble()34 void testlongdouble() {
35   long double ld = 2.0;
36   foold(&ld);
37 }
38