1 // RUN: %clang_cc1 -std=c++1z -emit-llvm -triple x86_64-linux-gnu -o - %s | FileCheck %s
17 // CHECK-LABEL: define {{.*}} @_Z1gv(
19 // CHECK: %[[A:.*]] = alloca
22 // CHECK: call {{.*}} @_Z1fv(ptr sret({{.*}}) align 4 %[[A]])
26 // CHECK: call void @_Z1hv(
30 // CHECK: call void @_ZN1AD1Ev(ptr {{[^,]*}} %[[A]])
37 // CHECK-LABEL: define {{.*}} @_Z1hv(
39 // CHECK: %[[A:.*]] = alloca
43 // CHECK: call {{.*}} @_Z1fv(ptr sret({{.*}}) align 4 %[[A]])
45 // CHECK: call {{.*}} @_Z1f1A(ptr noundef %[[A]])
48 // CHECK: call void @_ZN1AD1Ev(ptr {{[^,]*}} %[[A]])
50 // CHECK: call void @_Z1hv(
57 // We still pass classes with trivial copy/move constructors and destructors in
58 // registers, even if the copy is formally omitted.
67 // CHECK-LABEL: define {{.*}} @_Z1iv(
69 // CHECK: %[[B:.*]] = alloca
73 // CHECK: %[[B_N:.*]] = call i32 @_Z2fBv()
75 // CHECK: store i32 %[[B_N]],
77 // CHECK: %[[B_N:.*]] = load i32
79 // CHECK: call void @_Z2fB1B(i32 %[[B_N]])
85 // CHECK-LABEL: define {{.*}} @_Z1jv(
88 // CHECK: %[[OUTERTEMP:.*]] = alloca %{{.*}}
89 // CHECK: %[[INNERTEMP:.*]] = alloca %{{.*}}
90 // CHECK: call void @_ZN1AC1Ei(ptr {{.*}} %[[INNERTEMP]], i32 noundef 1)
91 // CHECK: call noundef zeroext i1 @_ZN1AcvbEv(ptr {{.*}} %[[INNERTEMP]])
94 // CHECK: call void @_ZN1AC1EOS_(ptr {{.*}} %[[OUTERTEMP]], ptr {{.*}} %[[INNERTEMP]])
97 // CHECK: call void @_ZN1AC1Ei(ptr {{.*}} %[[OUTERTEMP]], i32 noundef 2)
100 // CHECK: call void @_ZN1AD1Ev(ptr {{.*}} %[[INNERTEMP]])
101 A
&&a
= A(1) ?: A(2);
103 // CHECK: call void @_Z1iv()
106 // CHECK: call void @_ZN1AD1Ev(ptr {{.*}} %[[OUTERTEMP]])