Skip to content

Commit 0a351d6

Browse files
jeffnnJeff Noyle
authored andcommitted
Fix tests (#3195)
Co-authored-by: Jeff Noyle <[email protected]>
1 parent 065f781 commit 0a351d6

3 files changed

Lines changed: 8 additions & 24 deletions

File tree

tools/clang/test/HLSLFileCheck/pix/DbgValueToDbgDeclare.hlsl

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
// RUN: %dxc -EFlowControlPS -Tps_6_0 /O3 /Zi %s | %FileCheck %s --check-prefixes=VEC,VEC-BUG
2-
// RUN: %dxc -EFlowControlPS -Tps_6_0 /O3 /Zi %s | %opt -S -dxil-dbg-value-to-dbg-declare | %FileCheck %s --check-prefixes=VEC,VEC-CHK
3-
// RUN: %dxc -ESVPosAt1PS -Tps_6_0 /Od /Zi %s | %FileCheck %s --check-prefixes=NULL,NULL-BUG
4-
// RUN: %dxc -ESVPosAt1PS -Tps_6_0 /Od /Zi %s | %opt -S -dxil-dbg-value-to-dbg-declare | %FileCheck %s --check-prefixes=NULL,NULL-CHK
5-
// RUN: %dxc -EGeometryPS -Tps_6_0 /O3 /Zi %s | %FileCheck %s --check-prefixes=RES,RES-BUG
6-
// RUN: %dxc -EGeometryPS -Tps_6_0 /O3 /Zi %s | %opt -S -dxil-dbg-value-to-dbg-declare | %FileCheck %s --check-prefixes=RES,RES-CHK
1+
// RUN: %dxc -EFlowControlPS -Tps_6_0 /O3 /Zi %s | %FileCheck %s -check-prefixes=VEC,VEC-BUG
2+
// RUN: %dxc -EFlowControlPS -Tps_6_0 /O3 /Zi %s | %opt -S -dxil-dbg-value-to-dbg-declare | %FileCheck %s -check-prefixes=VEC,VEC-CHK
3+
// RUN: %dxc -EGeometryPS -Tps_6_0 /O3 /Zi %s | %FileCheck %s -check-prefixes=RES,RES-BUG
4+
// RUN: %dxc -EGeometryPS -Tps_6_0 /O3 /Zi %s | %opt -S -dxil-dbg-value-to-dbg-declare | %FileCheck %s -check-prefixes=RES,RES-CHK
75

86
// These tests are designed to exercise the dbg.value to dbg.declare conversion
97
// pass' handling of known issues with dxcompiler's emission of debug info.
@@ -99,24 +97,10 @@ float4 FlowControlPS(VS_OUTPUT_ENV input) : SV_Target
9997
return ret;
10098
}
10199

102-
/***************************************************
103-
* Test for dxcompiler bug workaround: *
104-
* null value in dbg.value *
105-
***************************************************/
106-
// NULL-LABEL: entry:
107-
// NULL-BUG: @llvm.dbg.value(metadata ![[NUL_MD:[0-9]+]]
108-
// NULL-BUG: ![[NUL_MD]] = {}
109-
// NULL-CHK-NOT: call {{.*}} @llvm.dbg.value
110-
float4 SVPosAt1PS(VS_OUTPUT_PosAt1 input) : SV_Target
111-
{
112-
return float4(input.Pos.x / 512.f, input.Pos.y / 512.f, 1.f, 1.f);
113-
}
114-
115100
/***************************************************
116101
* Test for dxcompiler bug workaround: *
117102
* dx.types.ResRet.f32 in dbg.value *
118103
***************************************************/
119-
// RES-LABEL: entry:
120104
// RES: %[[S:[0-9]+]] = call %dx.types.ResRet.f32 @dx.op.sample.f32
121105
// RES-BUG: @llvm.dbg.value(metadata %dx.types.ResRet.f32
122106
// RES-CHK-DAG: %[[X:[0-9]+]] = extractvalue %dx.types.ResRet.f32 %[[S]], 0

tools/clang/test/HLSLFileCheck/pix/DebugBasic.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
// CHECK: %IncrementForThisInvocation = mul i32 8, %OffsetMultiplicand
1717

1818
// Check the first instruction was instrumented:
19-
// CHECK: %UAVIncResult = call i32 @dx.op.atomicBinOp.i32(i32 78, %dx.types.Handle %PIX_DebugUAV_Handle, i32 0, i32 0, i32 undef, i32 undef, i32 %IncrementForThisInvocation)
19+
// CHECK: %UAVIncResult = call i32 @dx.op.atomicBinOp.i32(i32 78, %dx.types.Handle %PIX_DebugUAV_Handle, i32 0
2020
// CHECK: %MaskedForUAVLimit = and i32 %UAVIncResult, 983039
2121
// CHECK: %MultipliedForInterest = mul i32 %MaskedForUAVLimit, %OffsetMultiplicand
2222
// CHECK: %AddedForInterest = add i32 %MultipliedForInterest, %OffsetAddend
23-
// CHECK: call void @dx.op.bufferStore.i32(i32 69, %dx.types.Handle %PIX_DebugUAV_Handle, i32 %AddedForInterest, i32 undef, i32 0, i32 undef, i32 undef, i32 undef, i8 1)
23+
// CHECK: call void @dx.op.bufferStore.i32(i32 69, %dx.types.Handle %PIX_DebugUAV_Handle, i32 %AddedForInterest
2424

2525

2626
[RootSignature("")]

tools/clang/test/HLSLFileCheck/pix/DebugFlowControl.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
// Check that flow control constructs don't break the instrumentation.
44

5-
// CHECK: %UAVIncResult2 = call i32 @dx.op.atomicBinOp.i32(i32 78, %dx.types.Handle %PIX_DebugUAV_Handle, i32 0, i32 0, i32 undef, i32 undef, i32 %IncrementForThisInvocation1)
5+
// CHECK: %UAVIncResult2 = call i32 @dx.op.atomicBinOp.i32(i32 78, %dx.types.Handle %PIX_DebugUAV_Handle, i32 0
66

77
// CHECK: %MaskedForUAVLimit3 = and i32 %UAVIncResult2, 983039
88

99
// CHECK: %MultipliedForInterest4 = mul i32 %MaskedForUAVLimit3, %OffsetMultiplicand
1010

1111
// CHECK: %AddedForInterest5 = add i32 %MultipliedForInterest4, %OffsetAddend
1212

13-
// CHECK: call void @dx.op.bufferStore.i32(i32 69, %dx.types.Handle %PIX_DebugUAV_Handle, i32 %AddedForInterest5, i32 undef
13+
// CHECK: call void @dx.op.bufferStore.i32(i32 69, %dx.types.Handle %PIX_DebugUAV_Handle, i32 %AddedForInterest5
1414

1515

1616
struct VS_OUTPUT_ENV {

0 commit comments

Comments
 (0)