1 // RUN: %clang_cc1 -triple i386-pc-win32 -fms-extensions -emit-llvm -fms-volatile -o - < %s | FileCheck %s
8 typedef _Complex
float __declspec(align(8)) baz
;
17 void test1(struct foo
*p
, struct foo
*q
) {
19 // CHECK-LABEL: @test1
20 // CHECK: load atomic volatile {{.*}} acquire, align 4
21 // CHECK: store atomic volatile {{.*}}, {{.*}} release, align 4
23 void test2(volatile int *p
, volatile int *q
) {
25 // CHECK-LABEL: @test2
26 // CHECK: load atomic volatile {{.*}} acquire, align 4
27 // CHECK: store atomic volatile {{.*}}, {{.*}} release, align 4
29 void test3(struct foo
*p
, struct foo
*q
) {
31 // CHECK-LABEL: @test3
32 // CHECK: load atomic volatile {{.*}} acquire, align 4
33 // CHECK: store atomic volatile {{.*}}, {{.*}} release, align 4
35 void test4(volatile struct foo
*p
, volatile struct foo
*q
) {
37 // CHECK-LABEL: @test4
38 // CHECK: load atomic volatile {{.*}} acquire, align 4
39 // CHECK: store atomic volatile {{.*}}, {{.*}} release, align 4
41 void test5(volatile struct foo
*p
, volatile struct foo
*q
) {
43 // CHECK-LABEL: @test5
44 // CHECK: load atomic volatile {{.*}} acquire, align 4
45 // CHECK: store atomic volatile {{.*}}, {{.*}} release, align 4
47 void test6(struct bar
*p
, struct bar
*q
) {
49 // CHECK-LABEL: @test6
50 // CHECK-NOT: load atomic volatile {{.*}}
51 // CHECK-NOT: store atomic volatile {{.*}}, {{.*}}
53 void test7(volatile struct bar
*p
, volatile struct bar
*q
) {
55 // CHECK-LABEL: @test7
56 // CHECK: load atomic volatile {{.*}} acquire, align 4
57 // CHECK: store atomic volatile {{.*}}, {{.*}} release, align 4
59 void test8(volatile double *p
, volatile double *q
) {
61 // CHECK-LABEL: @test8
62 // CHECK: load volatile {{.*}}, align 8
63 // CHECK: store volatile {{.*}}, {{.*}}, align 8
65 void test9(volatile baz
*p
, baz
*q
) {
67 // CHECK-LABEL: @test9
68 // CHECK: store volatile {{.*}}, {{.*}}, align 8
69 // CHECK: store volatile {{.*}}, {{.*}}, align 4
71 void test10(volatile long long *p
, volatile long long *q
) {
73 // CHECK-LABEL: @test10
74 // CHECK: load volatile {{.*}}, align 8
75 // CHECK: store volatile {{.*}}, {{.*}}, align 8
77 void test11(volatile float *p
, volatile float *q
) {
79 // CHECK-LABEL: @test11
80 // CHECK: load atomic volatile {{.*}} acquire, align 4
81 // CHECK: store atomic volatile {{.*}}, {{.*}} release, align 4
83 int test12(struct qux
*p
) {
85 // CHECK-LABEL: @test12
86 // CHECK: load volatile {{.*}}, align 1