|
| 1 | +; REQUIRES: dxil-1-9 |
1 | 2 | ; RUN: not %dxv %s 2>&1 | FileCheck %s |
2 | 3 |
|
3 | 4 | target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64" |
4 | 5 | target triple = "dxil-ms-dx" |
5 | 6 |
|
6 | 7 | %dx.types.HitObject = type { i8* } |
7 | 8 |
|
| 9 | +; CHECK: Function: ?main@@YAXXZ: error: Use of undef coherence hint or num coherence hint bits in MaybeReorderThread. |
| 10 | +; CHECK-NEXT: note: at 'call void @dx.op.maybeReorderThread(i32 268, %dx.types.HitObject %nop, i32 1, i32 undef)' |
| 11 | + |
| 12 | +; CHECK: Function: ?main@@YAXXZ: error: Use of undef coherence hint or num coherence hint bits in MaybeReorderThread. |
| 13 | +; CHECK-NEXT: note: at 'call void @dx.op.maybeReorderThread(i32 268, %dx.types.HitObject %nop, i32 undef, i32 1)' |
| 14 | + |
| 15 | +; CHECK: Function: ?main@@YAXXZ: error: HitObject is undef. |
| 16 | +; CHECK-NEXT: note: at 'call void @dx.op.maybeReorderThread(i32 268, %dx.types.HitObject undef, i32 11, i32 0)' |
| 17 | + |
| 18 | +; CHECK: Validation failed. |
| 19 | + |
8 | 20 | ; Function Attrs: nounwind |
9 | 21 | define void @"\01?main@@YAXXZ"() #0 { |
10 | 22 | %nop = call %dx.types.HitObject @dx.op.hitObject_MakeNop(i32 266) ; HitObject_MakeNop() |
11 | 23 |
|
12 | | -; Validate that coherence hint is not undef. |
13 | | - call void @dx.op.maybeReorderThread(i32 268, %dx.types.HitObject %nop, i32 undef, i32 0) ; MaybeReorderThread(hitObject,coherenceHint,numCoherenceHintBitsFromLSB) |
14 | | -; CHECK: Function: ?main@@YAXXZ: error: Use of undef coherence hint or num coherence hint bits in MaybeReorderThread. |
15 | | -; CHECK-NEXT: note: at 'call void @dx.op.maybeReorderThread(i32 268, %dx.types.HitObject %nop, i32 undef, i32 0)' |
| 24 | + ; Validate that hit object is not undef. |
| 25 | + call void @dx.op.maybeReorderThread(i32 268, %dx.types.HitObject undef, i32 11, i32 0) ; MaybeReorderThread(hitObject,coherenceHint,numCoherenceHintBitsFromLSB) |
16 | 26 |
|
17 | | -; Validate that num coherence hint bits from LSB is not undef. |
| 27 | + ; Validate that coherence hint is not undef while numCoherenceHintBitsFromLSB is not 0. |
| 28 | + call void @dx.op.maybeReorderThread(i32 268, %dx.types.HitObject %nop, i32 undef, i32 1) ; MaybeReorderThread(hitObject,coherenceHint,numCoherenceHintBitsFromLSB) |
| 29 | + |
| 30 | + ; Validate that num coherence hint bits from LSB is not undef. |
18 | 31 | call void @dx.op.maybeReorderThread(i32 268, %dx.types.HitObject %nop, i32 1, i32 undef) ; MaybeReorderThread(hitObject,coherenceHint,numCoherenceHintBitsFromLSB) |
19 | | -; CHECK-NEXT: Function: ?main@@YAXXZ: error: Use of undef coherence hint or num coherence hint bits in MaybeReorderThread. |
20 | | -; CHECK-NEXT: note: at 'call void @dx.op.maybeReorderThread(i32 268, %dx.types.HitObject %nop, i32 1, i32 undef)' |
21 | 32 | ret void |
22 | 33 | } |
23 | | -; CHECK-NEXT: Validation failed. |
24 | 34 |
|
25 | 35 | ; Function Attrs: nounwind readnone |
26 | 36 | declare %dx.types.HitObject @dx.op.hitObject_MakeNop(i32) #1 |
|
0 commit comments