[LV] Add test showing debug output for loops with uncountable BTCs.
[llvm-project.git] / clang / test / CodeGen / 2006-05-19-SingleEltReturn.c
blobb542242606cc389c8722785e700cd7282b2c5cd6
1 // Test returning a single element aggregate value containing a double.
2 // RUN: %clang_cc1 -triple i686-linux %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_32
3 // RUN: %clang_cc1 %s -emit-llvm -o -
5 struct X {
6 double D;
7 };
9 struct Y {
10 struct X x;
13 struct Y bar(void);
15 void foo(struct Y *P) {
16 *P = bar();
19 struct Y bar(void) {
20 struct Y a;
21 a.x.D = 0;
22 return a;
26 // X86_32: define{{.*}} void @foo(ptr noundef %P)
27 // X86_32: call void @bar(ptr dead_on_unwind writable sret(%struct.Y) align 4 %{{[^),]*}})
29 // X86_32: define{{.*}} void @bar(ptr dead_on_unwind noalias writable sret(%struct.Y) align 4 %{{[^,)]*}})
30 // X86_32: ret void