1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -emit-llvm -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s
\r
16 [numthreads(1, 1, 1)]
\r
18 Pair Vals = {1, 2.0};
\r
19 Vals.First = Vals.getFirst();
\r
20 Vals.Second = Vals.getSecond();
\r
23 // This tests reference like `this` in HLSL
\r
24 // CHECK: %call = call noundef i32 @"?getFirst@Pair@@QAAHXZ"(ptr noundef nonnull align 4 dereferenceable(8) %Vals)
\r
25 // CHECK-NEXT: %First = getelementptr inbounds %struct.Pair, ptr %Vals, i32 0, i32 0
\r
26 // CHECK-NEXT: store i32 %call, ptr %First, align 4
\r
27 // CHECK-NEXT: %call1 = call noundef float @"?getSecond@Pair@@QAAMXZ"(ptr noundef nonnull align 4 dereferenceable(8) %Vals)
\r
28 // CHECK-NEXT: %Second = getelementptr inbounds %struct.Pair, ptr %Vals, i32 0, i32 1
\r