|
| 1 | +; REQUIRES: dxil-1-9 |
| 2 | +; RUN: not %dxv %s 2>&1 | FileCheck %s |
| 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" |
| 5 | +target triple = "dxil-ms-dx" |
| 6 | + |
| 7 | +%dx.types.HitObject = type { i8* } |
| 8 | + |
| 9 | +; CHECK: Function: ?main@@YAXXZ: error: Instructions should not read uninitialized value. |
| 10 | +; CHECK: note: at '%r265_udmiss = call %dx.types.HitObject @dx.op.hitObject_MakeMiss(i32 265, i32 4, i32 undef, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 9.999000e+03)' in block '#0' of function '?main@@YAXXZ'. |
| 11 | +; CHECK: Function: ?main@@YAXXZ: error: Instructions should not read uninitialized value. |
| 12 | +; CHECK: note: at '%r265_udflags = call %dx.types.HitObject @dx.op.hitObject_MakeMiss(i32 265, i32 undef, i32 0, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 9.999000e+03)' in block '#0' of function '?main@@YAXXZ'. |
| 13 | +; CHECK: Validation failed. |
| 14 | + |
| 15 | +; Function Attrs: nounwind |
| 16 | +define void @"\01?main@@YAXXZ"() #0 { |
| 17 | + %r265_udflags = call %dx.types.HitObject @dx.op.hitObject_MakeMiss(i32 265, i32 undef, i32 0, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 9.999000e+03) ; HitObject_MakeMiss(RayFlags,MissShaderIndex,Origin_X,Origin_Y,Origin_Z,TMin,Direction_X,Direction_Y,Direction_Z,TMax) |
| 18 | + %r265_udmiss = call %dx.types.HitObject @dx.op.hitObject_MakeMiss(i32 265, i32 4, i32 undef, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 9.999000e+03) ; HitObject_MakeMiss(RayFlags,MissShaderIndex,Origin_X,Origin_Y,Origin_Z,TMin,Direction_X,Direction_Y,Direction_Z,TMax) |
| 19 | + ret void |
| 20 | +} |
| 21 | + |
| 22 | +; Function Attrs: nounwind readnone |
| 23 | +declare %dx.types.HitObject @dx.op.hitObject_MakeMiss(i32, i32, i32, float, float, float, float, float, float, float, float) #1 |
| 24 | + |
| 25 | +attributes #0 = { nounwind } |
| 26 | +attributes #1 = { nounwind readnone } |
| 27 | + |
| 28 | +!dx.version = !{!0} |
| 29 | +!dx.valver = !{!0} |
| 30 | +!dx.shaderModel = !{!1} |
| 31 | +!dx.typeAnnotations = !{!2} |
| 32 | +!dx.entryPoints = !{!9, !11} |
| 33 | + |
| 34 | +!0 = !{i32 1, i32 9} |
| 35 | +!1 = !{!"lib", i32 6, i32 9} |
| 36 | +!2 = !{i32 1, void ()* @"\01?main@@YAXXZ", !3} |
| 37 | +!3 = !{!4} |
| 38 | +!4 = !{i32 1, !5, !5} |
| 39 | +!5 = !{} |
| 40 | +!9 = !{null, !"", null, null, !10} |
| 41 | +!10 = !{i32 0, i64 0} |
| 42 | +!11 = !{void ()* @"\01?main@@YAXXZ", !"\01?main@@YAXXZ", null, null, !12} |
| 43 | +!12 = !{i32 8, i32 7, i32 5, !13} |
| 44 | +!13 = !{i32 0} |
0 commit comments