Skip to content

Commit f6bf30a

Browse files
authored
[SPIR-V] Remove invalid CHECK-COUNTs (microsoft#5915)
CHECK-COUNT-# was not yet implemented in the version of FileCheck used in DXC, so these lines were not checked at all. Switching them to CHECKs caused the tests to fail, so they're now replaced with a combination of a CHECK and CHECK-NOT that pass. This was caught by the downstream test runner that uses a newer version of FileCheck which does check CHECK-COUNTs.
1 parent e1774f6 commit f6bf30a

8 files changed

+20
-8
lines changed

tools/clang/test/CodeGenSPIRV_Lit/raytracing.khr.closesthit.hlsl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
// CHECK: OpDecorate [[m:%[0-9]+]] BuiltIn RayGeometryIndexKHR
1919
// CHECK: OpDecorate [[n:%[0-9]+]] BuiltIn RayTmaxNV
2020

21+
// CHECK: %accelerationStructureNV = OpTypeAccelerationStructureKHR
22+
// CHECK-NOT: OpTypeAccelerationStructureKHR
23+
2124
// CHECK: OpTypePointer IncomingRayPayloadNV %Payload
2225
struct Payload
2326
{
@@ -34,7 +37,6 @@ struct Attribute
3437
float2 bary;
3538
};
3639

37-
// CHECK-COUNT-1: [[rstype:%[0-9]+]] = OpTypeAccelerationStructureNV
3840
RaytracingAccelerationStructure rs;
3941

4042
[shader("closesthit")]

tools/clang/test/CodeGenSPIRV_Lit/raytracing.khr.closesthit.vulkan1.1spirv1.4.hlsl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
// CHECK: OpDecorate [[m:%[0-9]+]] BuiltIn RayGeometryIndexKHR
2222
// CHECK: OpDecorate [[n:%[0-9]+]] BuiltIn RayTmaxNV
2323

24+
// CHECK: %accelerationStructureNV = OpTypeAccelerationStructureKHR
25+
// CHECK-NOT: OpTypeAccelerationStructureKHR
26+
2427
// CHECK: OpTypePointer IncomingRayPayloadNV %Payload
2528
struct Payload
2629
{
@@ -37,7 +40,6 @@ struct Attribute
3740
float2 bary;
3841
};
3942

40-
// CHECK-COUNT-1: [[rstype:%[0-9]+]] = OpTypeAccelerationStructureNV
4143
RaytracingAccelerationStructure rs;
4244

4345
[shader("closesthit")]

tools/clang/test/CodeGenSPIRV_Lit/raytracing.nv.anyhit.hlsl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
// CHECK: OpDecorate [[l:%[0-9]+]] BuiltIn HitKindNV
1818
// CHECK: OpDecorate [[m:%[0-9]+]] BuiltIn HitTNV
1919

20+
// CHECK: %accelerationStructureNV = OpTypeAccelerationStructureKHR
21+
// CHECK-NOT: OpTypeAccelerationStructureKHR
22+
2023
// CHECK: OpTypePointer IncomingRayPayloadNV %Payload
2124
struct Payload
2225
{
@@ -28,7 +31,6 @@ struct Attribute
2831
float2 bary;
2932
};
3033

31-
// CHECK-COUNT-1: [[rstype:%[0-9]+]] = OpTypeAccelerationStructureNV
3234
RaytracingAccelerationStructure rs;
3335

3436
[shader("anyhit")]

tools/clang/test/CodeGenSPIRV_Lit/raytracing.nv.closesthit.hlsl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
// CHECK: OpDecorate [[l:%[0-9]+]] BuiltIn HitKindNV
1818
// CHECK: OpDecorate [[m:%[0-9]+]] BuiltIn HitTNV
1919

20+
// CHECK: %accelerationStructureNV = OpTypeAccelerationStructureKHR
21+
// CHECK-NOT: OpTypeAccelerationStructureKHR
22+
2023
// CHECK: OpTypePointer IncomingRayPayloadNV %Payload
2124
struct Payload
2225
{
@@ -28,7 +31,6 @@ struct Attribute
2831
float2 bary;
2932
};
3033

31-
// CHECK-COUNT-1: [[rstype:%[0-9]+]] = OpTypeAccelerationStructureNV
3234
RaytracingAccelerationStructure rs;
3335

3436
[shader("closesthit")]

tools/clang/test/CodeGenSPIRV_Lit/raytracing.nv.enum.hlsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
// CHECK: OpDecorate [[a:%[0-9]+]] BuiltIn LaunchIdNV
55
// CHECK: OpDecorate [[b:%[0-9]+]] BuiltIn LaunchSizeNV
66

7-
// CHECK-COUNT-1: [[rstype:%[0-9]+]] = OpTypeAccelerationStructureNV
7+
// CHECK: %accelerationStructureNV = OpTypeAccelerationStructureKHR
8+
// CHECK-NOT: OpTypeAccelerationStructureKHR
89
RaytracingAccelerationStructure rs;
910

1011
struct Payload

tools/clang/test/CodeGenSPIRV_Lit/raytracing.nv.library.hlsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
// CHECK: OpDecorate [[k:%[0-9]+]] BuiltIn WorldToObjectNV
2929
// CHECK: OpDecorate [[l:%[0-9]+]] BuiltIn HitKindNV
3030

31+
// CHECK: %accelerationStructureNV = OpTypeAccelerationStructureKHR
32+
// CHECK-NOT: OpTypeAccelerationStructureKHR
3133

3234
// CHECK: OpTypePointer CallableDataNV %CallData
3335
struct CallData
@@ -44,7 +46,6 @@ struct Attribute
4446
{
4547
float2 bary;
4648
};
47-
// CHECK-COUNT-1: [[rstype:%[0-9]+]] = OpTypeAccelerationStructureNV
4849
RaytracingAccelerationStructure rs;
4950

5051

tools/clang/test/CodeGenSPIRV_Lit/raytracing.nv.raygen.hlsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
// CHECK: OpDecorate [[a:%[0-9]+]] BuiltIn LaunchIdNV
55
// CHECK: OpDecorate [[b:%[0-9]+]] BuiltIn LaunchSizeNV
66

7-
// CHECK-COUNT-1: [[rstype:%[0-9]+]] = OpTypeAccelerationStructureNV
7+
// CHECK: %accelerationStructureNV = OpTypeAccelerationStructureKHR
8+
// CHECK-NOT: OpTypeAccelerationStructureKHR
89
RaytracingAccelerationStructure rs;
910

1011
struct Payload

tools/clang/test/CodeGenSPIRV_Lit/unsupported/rayquery_init_rgen.hlsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
// CHECK: OpExtension "SPV_KHR_ray_tracing"
55
// CHECK: OpExtension "SPV_KHR_ray_query"
66

7-
// CHECK-COUNT-1: [[rs:%\d+]] = OpTypeAccelerationStructureNV
7+
// CHECK: %accelerationStructureNV = OpTypeAccelerationStructureKHR
8+
// CHECK-NOT: OpTypeAccelerationStructureKHR
89
RaytracingAccelerationStructure AccelerationStructure : register(t0);
910
RayDesc MakeRayDesc()
1011
{

0 commit comments

Comments
 (0)