|
1 | 1 | // RUN: %dxc -T lib_6_x %S/node-object-export-1.hlsl -Fo %t.1
|
2 | 2 | // RUN: %dxc -T lib_6_x %s -Fo %t.2
|
3 |
| -// RUN: %dxc -T lib_6_x -link "%t.1;%t.2" | FileCheck %s |
| 3 | +// RUN: %dxc -T lib_6_x -link "%t.1;%t.2" -Fc %t.ll |
| 4 | +// RUN: FileCheck %s --input-file %t.ll --check-prefix=FOO2 |
| 5 | +// RUN: FileCheck %s --input-file %t.ll --check-prefix=BAR |
| 6 | +// RUN: FileCheck %s --input-file %t.ll --check-prefix=BAR2 |
| 7 | +// RUN: FileCheck %s --input-file %t.ll --check-prefix=BAR3 |
| 8 | +// RUN: FileCheck %s --input-file %t.ll --check-prefix=BAR4 |
| 9 | +// RUN: FileCheck %s --input-file %t.ll --check-prefix=FOO |
4 | 10 |
|
5 | 11 | // Confirm that linking a shader calling external functions that take node objects as parameters
|
6 | 12 | // correctly includes the external and internal functions
|
7 | 13 |
|
8 | 14 | // Confirm that external function "foo2" is correctly included here even though it is called only by external functions
|
9 |
| -// CHECK: define void @"\01?foo2@@YA?AU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"* noalias nocapture sret, %"struct.DispatchNodeInputRecord<RECORD>"* nocapture readonly) #0 { |
10 |
| -// CHECK: %[[Ld:.+]] = load %"struct.DispatchNodeInputRecord<RECORD>", %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
11 |
| -// CHECK: store %"struct.DispatchNodeInputRecord<RECORD>" %[[Ld]], %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
| 15 | +// FOO2: define void @"\01?foo2@@YA?AU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"* noalias nocapture sret, %"struct.DispatchNodeInputRecord<RECORD>"* nocapture readonly) #{{[0-9]+}} { |
| 16 | +// FOO2-NEXT: %[[Ld:.+]] = load %"struct.DispatchNodeInputRecord<RECORD>", %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
| 17 | +// FOO2-NEXT: store %"struct.DispatchNodeInputRecord<RECORD>" %[[Ld]], %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
12 | 18 |
|
13 | 19 | // Confirm that external function "bar" is correctly included here since it is called by bar3
|
14 |
| -// CHECK: define void @"\01?bar@@YAXU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"* nocapture readonly, %"struct.DispatchNodeInputRecord<RECORD>"* noalias nocapture) #0 { |
15 |
| -// CHECK: %[[Alloca:.+]] = alloca %"struct.DispatchNodeInputRecord<RECORD>", align 8 |
16 |
| -// CHECK: call void @"\01?foo@@YA?AU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"* nonnull sret %[[Alloca]], %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}) |
17 |
| -// CHECK: %[[Ld:.+]] = load %"struct.DispatchNodeInputRecord<RECORD>", %"struct.DispatchNodeInputRecord<RECORD>"* %[[Alloca]], align 8 |
18 |
| -// CHECK: store %"struct.DispatchNodeInputRecord<RECORD>" %[[Ld]], %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
| 20 | +// BAR: define void @"\01?bar@@YAXU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"* nocapture readonly, %"struct.DispatchNodeInputRecord<RECORD>"* noalias nocapture) #{{[0-9]+}} { |
| 21 | +// BAR-NEXT: %[[Alloca:.+]] = alloca %"struct.DispatchNodeInputRecord<RECORD>", align 8 |
| 22 | +// BAR-NEXT: call void @"\01?foo@@YA?AU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"* nonnull sret %[[Alloca]], %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}) |
| 23 | +// BAR-NEXT: %[[Ld:.+]] = load %"struct.DispatchNodeInputRecord<RECORD>", %"struct.DispatchNodeInputRecord<RECORD>"* %[[Alloca]], align 8 |
| 24 | +// BAR-NEXT: store %"struct.DispatchNodeInputRecord<RECORD>" %[[Ld]], %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
19 | 25 |
|
20 | 26 | // Confirm that external function "bar2" is correctly included here since it is called by bar4
|
21 |
| -// CHECK: define void @"\01?bar2@@YAXU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"* nocapture readonly, %"struct.DispatchNodeInputRecord<RECORD>"* noalias nocapture) #1 { |
22 |
| -// CHECK: %[[Ld:.+]] = load %"struct.DispatchNodeInputRecord<RECORD>", %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
23 |
| -// CHECK: store %"struct.DispatchNodeInputRecord<RECORD>" %[[Ld]], %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
| 27 | +// BAR2: define void @"\01?bar2@@YAXU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"* nocapture readonly, %"struct.DispatchNodeInputRecord<RECORD>"* noalias nocapture) #{{[0-9]+}} { |
| 28 | +// BAR2-NEXT: %[[Ld:.+]] = load %"struct.DispatchNodeInputRecord<RECORD>", %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
| 29 | +// BAR2-NEXT: store %"struct.DispatchNodeInputRecord<RECORD>" %[[Ld]], %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
24 | 30 |
|
25 | 31 | // Confirm that internal function "bar3" is correctly included here and calls external function "foo"
|
26 |
| -// CHECK: define void @"\01?bar3@@YAXU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"*, %"struct.DispatchNodeInputRecord<RECORD>"* noalias) #0 { |
27 |
| -// CHECK: %[[Alloca:.+]] = alloca %"struct.DispatchNodeInputRecord<RECORD>", align 8 |
28 |
| -// CHECK: call void @"\01?foo@@YA?AU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"* nonnull sret %[[Alloca]], %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}) #2 |
29 |
| -// CHECK: %[[Ld:.+]] = load %"struct.DispatchNodeInputRecord<RECORD>", %"struct.DispatchNodeInputRecord<RECORD>"* %[[Alloca]], align 8 |
30 |
| -// CHECK: store %"struct.DispatchNodeInputRecord<RECORD>" %[[Ld]], %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
| 32 | +// BAR3: define void @"\01?bar3@@YAXU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"*, %"struct.DispatchNodeInputRecord<RECORD>"* noalias) #{{[0-9]+}} { |
| 33 | +// BAR3-NEXT: %[[Alloca:.+]] = alloca %"struct.DispatchNodeInputRecord<RECORD>", align 8 |
| 34 | +// BAR3-NEXT: call void @"\01?foo@@YA?AU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"* nonnull sret %[[Alloca]], %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}) #{{[0-9]+}} |
| 35 | +// BAR3-NEXT: %[[Ld:.+]] = load %"struct.DispatchNodeInputRecord<RECORD>", %"struct.DispatchNodeInputRecord<RECORD>"* %[[Alloca]], align 8 |
| 36 | +// BAR3-NEXT: store %"struct.DispatchNodeInputRecord<RECORD>" %[[Ld]], %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
31 | 37 |
|
32 | 38 | // Confirm that internal function "bar4" is correctly included here and calls outside function "bar2"
|
33 |
| -// CHECK: define void @"\01?bar4@@YAXU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"*, %"struct.DispatchNodeInputRecord<RECORD>"* noalias) #0 { |
34 |
| -// CHECK: call void @"\01?bar2@@YAXU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, %"struct.DispatchNodeInputRecord<RECORD>"* %1) #2 |
| 39 | +// BAR4: define void @"\01?bar4@@YAXU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"*, %"struct.DispatchNodeInputRecord<RECORD>"* noalias) #{{[0-9]+}} { |
| 40 | +// BAR4-NEXT: call void @"\01?bar2@@YAXU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, %"struct.DispatchNodeInputRecord<RECORD>"* %1) #{{[0-9]+}} |
35 | 41 |
|
36 | 42 | // Confirm that external function "foo" is correctly included here even though it is called only by external functions
|
37 |
| -// CHECK: define void @"\01?foo@@YA?AU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"* noalias nocapture sret, %"struct.DispatchNodeInputRecord<RECORD>"* nocapture readonly) #1 { |
38 |
| -// CHECK: %[[Ld:.+]] = load %"struct.DispatchNodeInputRecord<RECORD>", %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
39 |
| -// CHECK: store %"struct.DispatchNodeInputRecord<RECORD>" %[[Ld]], %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
| 43 | +// FOO: define void @"\01?foo@@YA?AU?$DispatchNodeInputRecord@URECORD@@@@U1@@Z"(%"struct.DispatchNodeInputRecord<RECORD>"* noalias nocapture sret, %"struct.DispatchNodeInputRecord<RECORD>"* nocapture readonly) #{{[0-9]+}} { |
| 44 | +// FOO-NEXT: %[[Ld:.+]] = load %"struct.DispatchNodeInputRecord<RECORD>", %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
| 45 | +// FOO-NEXT: store %"struct.DispatchNodeInputRecord<RECORD>" %[[Ld]], %"struct.DispatchNodeInputRecord<RECORD>"* %{{.+}}, align 4 |
40 | 46 |
|
41 | 47 |
|
42 | 48 | struct RECORD {
|
|
0 commit comments