|
| 1 | +; RUN: not %dxv %s 2>&1 | FileCheck %s |
| 2 | + |
| 3 | +; The purpose of this test is to verify an error is emitted when pre-sm6.9 |
| 4 | +; 16bit IsSpecialFloat OpClass is used. |
| 5 | + |
| 6 | +target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64" |
| 7 | +target triple = "dxil-ms-dx" |
| 8 | + |
| 9 | +; Function Attrs: nounwind readnone |
| 10 | +define i1 @"\01?test_isinf@@YA_N$f16@@Z"(half %h) #0 { |
| 11 | + ; CHECK-DAG: error: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 12 | + %1 = call i1 @dx.op.isSpecialFloat.f16(i32 9, half %h) ; IsInf(value) |
| 13 | + ret i1 %1 |
| 14 | +} |
| 15 | + |
| 16 | +; Function Attrs: nounwind readnone |
| 17 | +define <2 x i1> @"\01?test_isinf2@@YA?AV?$vector@_N$01@@V?$vector@$f16@$01@@@Z"(<2 x half> %h) #0 { |
| 18 | + ; CHECK-DAG: error: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 19 | + %1 = call <2 x i1> @dx.op.isSpecialFloat.v2f16(i32 9, <2 x half> %h) ; IsInf(value) |
| 20 | + ret <2 x i1> %1 |
| 21 | +} |
| 22 | + |
| 23 | +; Function Attrs: nounwind readnone |
| 24 | +define <3 x i1> @"\01?test_isinf3@@YA?AV?$vector@_N$02@@V?$vector@$f16@$02@@@Z"(<3 x half> %h) #0 { |
| 25 | + ; CHECK-DAG: error: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 26 | + %1 = call <3 x i1> @dx.op.isSpecialFloat.v3f16(i32 9, <3 x half> %h) ; IsInf(value) |
| 27 | + ret <3 x i1> %1 |
| 28 | +} |
| 29 | + |
| 30 | +; Function Attrs: nounwind readnone |
| 31 | +define <4 x i1> @"\01?test_isinf4@@YA?AV?$vector@_N$03@@V?$vector@$f16@$03@@@Z"(<4 x half> %h) #0 { |
| 32 | + ; CHECK-DAG: error: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 33 | + %1 = call <4 x i1> @dx.op.isSpecialFloat.v4f16(i32 9, <4 x half> %h) ; IsInf(value) |
| 34 | + ret <4 x i1> %1 |
| 35 | +} |
| 36 | + |
| 37 | +; Function Attrs: nounwind readnone |
| 38 | +define i1 @"\01?test_isnan@@YA_N$f16@@Z"(half %h) #0 { |
| 39 | + ; CHECK-DAG: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 40 | + %1 = call i1 @dx.op.isSpecialFloat.f16(i32 8, half %h) ; IsNaN(value) |
| 41 | + ret i1 %1 |
| 42 | +} |
| 43 | + |
| 44 | +; Function Attrs: nounwind readnone |
| 45 | +define <2 x i1> @"\01?test_isnan2@@YA?AV?$vector@_N$01@@V?$vector@$f16@$01@@@Z"(<2 x half> %h) #0 { |
| 46 | + ; CHECK-DAG: error: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 47 | + %1 = call <2 x i1> @dx.op.isSpecialFloat.v2f16(i32 8, <2 x half> %h) ; IsNaN(value) |
| 48 | + ret <2 x i1> %1 |
| 49 | +} |
| 50 | + |
| 51 | +; Function Attrs: nounwind readnone |
| 52 | +define <3 x i1> @"\01?test_isnan3@@YA?AV?$vector@_N$02@@V?$vector@$f16@$02@@@Z"(<3 x half> %h) #0 { |
| 53 | + ; CHECK-DAG: error: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 54 | + %1 = call <3 x i1> @dx.op.isSpecialFloat.v3f16(i32 8, <3 x half> %h) ; IsNaN(value) |
| 55 | + ret <3 x i1> %1 |
| 56 | +} |
| 57 | + |
| 58 | +; Function Attrs: nounwind readnone |
| 59 | +define <4 x i1> @"\01?test_isnan4@@YA?AV?$vector@_N$03@@V?$vector@$f16@$03@@@Z"(<4 x half> %h) #0 { |
| 60 | + ; CHECK-DAG: error: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 61 | + %1 = call <4 x i1> @dx.op.isSpecialFloat.v4f16(i32 8, <4 x half> %h) ; IsNaN(value) |
| 62 | + ret <4 x i1> %1 |
| 63 | +} |
| 64 | + |
| 65 | +; Function Attrs: nounwind readnone |
| 66 | +define i1 @"\01?test_isfinite@@YA_N$f16@@Z"(half %h) #0 { |
| 67 | + ; CHECK-DAG: error: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 68 | + %1 = call i1 @dx.op.isSpecialFloat.f16(i32 10, half %h) ; IsFinite(value) |
| 69 | + ret i1 %1 |
| 70 | +} |
| 71 | + |
| 72 | +; Function Attrs: nounwind readnone |
| 73 | +define <2 x i1> @"\01?test_isfinite2@@YA?AV?$vector@_N$01@@V?$vector@$f16@$01@@@Z"(<2 x half> %h) #0 { |
| 74 | + ; CHECK-DAG: error: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 75 | + %1 = call <2 x i1> @dx.op.isSpecialFloat.v2f16(i32 10, <2 x half> %h) ; IsFinite(value) |
| 76 | + ret <2 x i1> %1 |
| 77 | +} |
| 78 | + |
| 79 | +; Function Attrs: nounwind readnone |
| 80 | +define <3 x i1> @"\01?test_isfinite3@@YA?AV?$vector@_N$02@@V?$vector@$f16@$02@@@Z"(<3 x half> %h) #0 { |
| 81 | + ; CHECK-DAG: error: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 82 | + %1 = call <3 x i1> @dx.op.isSpecialFloat.v3f16(i32 10, <3 x half> %h) ; IsFinite(value) |
| 83 | + ret <3 x i1> %1 |
| 84 | +} |
| 85 | + |
| 86 | +; Function Attrs: nounwind readnone |
| 87 | +define <4 x i1> @"\01?test_isfinite4@@YA?AV?$vector@_N$03@@V?$vector@$f16@$03@@@Z"(<4 x half> %h) #0 { |
| 88 | + ; CHECK-DAG: error: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 89 | + %1 = call <4 x i1> @dx.op.isSpecialFloat.v4f16(i32 10, <4 x half> %h) ; IsFinite(value) |
| 90 | + ret <4 x i1> %1 |
| 91 | +} |
| 92 | + |
| 93 | +; Function Attrs: nounwind readnone |
| 94 | +define i1 @"\01?test_isnormal@@YA_N$f16@@Z"(half %h) #0 { |
| 95 | + ; CHECK-DAG: error: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 96 | + %1 = call i1 @dx.op.isSpecialFloat.f16(i32 11, half %h) ; IsNormal(value) |
| 97 | + ret i1 %1 |
| 98 | +} |
| 99 | + |
| 100 | +; Function Attrs: nounwind readnone |
| 101 | +define <2 x i1> @"\01?test_isnormal2@@YA?AV?$vector@_N$01@@V?$vector@$f16@$01@@@Z"(<2 x half> %h) #0 { |
| 102 | + ; CHECK-DAG: error: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 103 | + %1 = call <2 x i1> @dx.op.isSpecialFloat.v2f16(i32 11, <2 x half> %h) ; IsNormal(value) |
| 104 | + ret <2 x i1> %1 |
| 105 | +} |
| 106 | + |
| 107 | +; Function Attrs: nounwind readnone |
| 108 | +define <3 x i1> @"\01?test_isnormal3@@YA?AV?$vector@_N$02@@V?$vector@$f16@$02@@@Z"(<3 x half> %h) #0 { |
| 109 | + ; CHECK-DAG: error: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 110 | + %1 = call <3 x i1> @dx.op.isSpecialFloat.v3f16(i32 11, <3 x half> %h) ; IsNormal(value) |
| 111 | + ret <3 x i1> %1 |
| 112 | +} |
| 113 | + |
| 114 | +; Function Attrs: nounwind readnone |
| 115 | +define <4 x i1> @"\01?test_isnormal4@@YA?AV?$vector@_N$03@@V?$vector@$f16@$03@@@Z"(<4 x half> %h) #0 { |
| 116 | + ; CHECK-DAG: error: 16 bit IsSpecialFloat overloads require Shader Model 6.9 or higher. |
| 117 | + %1 = call <4 x i1> @dx.op.isSpecialFloat.v4f16(i32 11, <4 x half> %h) ; IsNormal(value) |
| 118 | + ret <4 x i1> %1 |
| 119 | +} |
| 120 | + |
| 121 | +; Function Attrs: nounwind readnone |
| 122 | +declare i1 @dx.op.isSpecialFloat.f16(i32, half) #0 |
| 123 | + |
| 124 | +; Function Attrs: nounwind readnone |
| 125 | +declare <2 x i1> @dx.op.isSpecialFloat.v2f16(i32, <2 x half>) #0 |
| 126 | + |
| 127 | +; Function Attrs: nounwind readnone |
| 128 | +declare <3 x i1> @dx.op.isSpecialFloat.v3f16(i32, <3 x half>) #0 |
| 129 | + |
| 130 | +; Function Attrs: nounwind readnone |
| 131 | +declare <4 x i1> @dx.op.isSpecialFloat.v4f16(i32, <4 x half>) #0 |
| 132 | + |
| 133 | +attributes #0 = { nounwind readnone } |
| 134 | + |
| 135 | +!llvm.ident = !{!0} |
| 136 | +!dx.version = !{!1} |
| 137 | +!dx.valver = !{!1} |
| 138 | +!dx.shaderModel = !{!2} |
| 139 | +!dx.entryPoints = !{!3} |
| 140 | + |
| 141 | +!0 = !{!"dxc(private) 1.8.0.14983 (main, 2da0a54f1)"} |
| 142 | +!1 = !{i32 1, i32 8} |
| 143 | +!2 = !{!"lib", i32 6, i32 8} |
| 144 | +!3 = !{null, !"", null, null, !4} |
| 145 | +!4 = !{i32 0, i64 8388640} |
0 commit comments