[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / CodeGen / volatile-2.c
blob1ceaf17dfcb422c19b2ae20e820ea686de5aa8af
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
3 void test0() {
4 // CHECK: define void @test0()
5 // CHECK: [[F:%.*]] = alloca float
6 // CHECK-NEXT: [[REAL:%.*]] = volatile load float* getelementptr inbounds ({{%.*}} @test0_v, i32 0, i32 0)
7 // CHECK-NEXT: volatile load float* getelementptr inbounds ({{%.*}} @test0_v, i32 0, i32 1)
8 // CHECK-NEXT: store float [[REAL]], float* [[F]], align 4
9 // CHECK-NEXT: ret void
10 extern volatile _Complex float test0_v;
11 float f = (float) test0_v;
14 void test1() {
15 // CHECK: define void @test1()
16 // CHECK: [[REAL:%.*]] = volatile load float* getelementptr inbounds ({{%.*}} @test1_v, i32 0, i32 0)
17 // CHECK-NEXT: [[IMAG:%.*]] = volatile load float* getelementptr inbounds ({{%.*}} @test1_v, i32 0, i32 1)
18 // CHECK-NEXT: volatile store float [[REAL]], float* getelementptr inbounds ({{%.*}} @test1_v, i32 0, i32 0)
19 // CHECK-NEXT: volatile store float [[IMAG]], float* getelementptr inbounds ({{%.*}} @test1_v, i32 0, i32 1)
20 // CHECK-NEXT: ret void
21 extern volatile _Complex float test1_v;
22 test1_v = test1_v;