brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 47a4bc3 Raw
24 lines · c
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s2 3void test0(void) {4  // CHECK-LABEL: define{{.*}} void @test0()5  // CHECK:      [[F:%.*]] = alloca float6  // CHECK-NEXT: [[REAL:%.*]] = load volatile float, ptr @test0_v, align 47  // CHECK-NEXT: load volatile float, ptr getelementptr inbounds nuw ({{.*}} @test0_v, i32 0, i32 1), align 48  // CHECK-NEXT: store float [[REAL]], ptr [[F]], align 49  // CHECK-NEXT: ret void10  extern volatile _Complex float test0_v;11  float f = (float) test0_v;12}13 14void test1(void) {15  // CHECK-LABEL: define{{.*}} void @test1()16  // CHECK:      [[REAL:%.*]] = load volatile float, ptr @test1_v, align 417  // CHECK-NEXT: [[IMAG:%.*]] = load volatile float, ptr getelementptr inbounds nuw ({{.*}} @test1_v, i32 0, i32 1), align 418  // CHECK-NEXT: store volatile float [[REAL]], ptr @test1_v, align 419  // CHECK-NEXT: store volatile float [[IMAG]], ptr getelementptr inbounds nuw ({{.*}} @test1_v, i32 0, i32 1), align 420  // CHECK-NEXT: ret void21  extern volatile _Complex float test1_v;22  test1_v = test1_v;23}24