|
14 | 14 | // RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF,SPIR_NO_HALF,SPIR_CHECK
|
15 | 15 |
|
16 | 16 |
|
17 |
| -// DXIL_NATIVE_HALF: %hlsl.lerp = call half @llvm.dx.lerp.f16(half %0, half %1, half %2) |
18 |
| -// SPIR_NATIVE_HALF: %hlsl.lerp = call half @llvm.spv.lerp.f16(half %0, half %1, half %2) |
| 17 | +// DXIL_NATIVE_HALF: %hlsl.lerp = call half @llvm.dx.lerp.f16(half %{{.*}}, half %{{.*}}, half %{{.*}}) |
| 18 | +// SPIR_NATIVE_HALF: %hlsl.lerp = call half @llvm.spv.lerp.f16(half %{{.*}}, half %{{.*}}, half %{{.*}}) |
19 | 19 | // NATIVE_HALF: ret half %hlsl.lerp
|
20 |
| -// DXIL_NO_HALF: %hlsl.lerp = call float @llvm.dx.lerp.f32(float %0, float %1, float %2) |
21 |
| -// SPIR_NO_HALF: %hlsl.lerp = call float @llvm.spv.lerp.f32(float %0, float %1, float %2) |
| 20 | +// DXIL_NO_HALF: %hlsl.lerp = call float @llvm.dx.lerp.f32(float %{{.*}}, float %{{.*}}, float %{{.*}}) |
| 21 | +// SPIR_NO_HALF: %hlsl.lerp = call float @llvm.spv.lerp.f32(float %{{.*}}, float %{{.*}}, float %{{.*}}) |
22 | 22 | // NO_HALF: ret float %hlsl.lerp
|
23 | 23 | half test_lerp_half(half p0) { return lerp(p0, p0, p0); }
|
24 | 24 |
|
25 |
| -// DXIL_NATIVE_HALF: %hlsl.lerp = call <2 x half> @llvm.dx.lerp.v2f16(<2 x half> %0, <2 x half> %1, <2 x half> %2) |
26 |
| -// SPIR_NATIVE_HALF: %hlsl.lerp = call <2 x half> @llvm.spv.lerp.v2f16(<2 x half> %0, <2 x half> %1, <2 x half> %2) |
| 25 | +// DXIL_NATIVE_HALF: %hlsl.lerp = call <2 x half> @llvm.dx.lerp.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, <2 x half> %{{.*}}) |
| 26 | +// SPIR_NATIVE_HALF: %hlsl.lerp = call <2 x half> @llvm.spv.lerp.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, <2 x half> %{{.*}}) |
27 | 27 | // NATIVE_HALF: ret <2 x half> %hlsl.lerp
|
28 |
| -// DXIL_NO_HALF: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2) |
29 |
| -// SPIR_NO_HALF: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2) |
| 28 | +// DXIL_NO_HALF: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %{{.*}}, <2 x float> %{{.*}}, <2 x float> %{{.*}}) |
| 29 | +// SPIR_NO_HALF: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %{{.*}}, <2 x float> %{{.*}}, <2 x float> %{{.*}}) |
30 | 30 | // NO_HALF: ret <2 x float> %hlsl.lerp
|
31 | 31 | half2 test_lerp_half2(half2 p0) { return lerp(p0, p0, p0); }
|
32 | 32 |
|
33 |
| -// DXIL_NATIVE_HALF: %hlsl.lerp = call <3 x half> @llvm.dx.lerp.v3f16(<3 x half> %0, <3 x half> %1, <3 x half> %2) |
34 |
| -// SPIR_NATIVE_HALF: %hlsl.lerp = call <3 x half> @llvm.spv.lerp.v3f16(<3 x half> %0, <3 x half> %1, <3 x half> %2) |
| 33 | +// DXIL_NATIVE_HALF: %hlsl.lerp = call <3 x half> @llvm.dx.lerp.v3f16(<3 x half> %{{.*}}, <3 x half> %{{.*}}, <3 x half> %{{.*}}) |
| 34 | +// SPIR_NATIVE_HALF: %hlsl.lerp = call <3 x half> @llvm.spv.lerp.v3f16(<3 x half> %{{.*}}, <3 x half> %{{.*}}, <3 x half> %{{.*}}) |
35 | 35 | // NATIVE_HALF: ret <3 x half> %hlsl.lerp
|
36 |
| -// DXIL_NO_HALF: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2) |
37 |
| -// SPIR_NO_HALF: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2) |
| 36 | +// DXIL_NO_HALF: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %{{.*}}, <3 x float> %{{.*}}, <3 x float> %{{.*}}) |
| 37 | +// SPIR_NO_HALF: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %{{.*}}, <3 x float> %{{.*}}, <3 x float> %{{.*}}) |
38 | 38 | // NO_HALF: ret <3 x float> %hlsl.lerp
|
39 | 39 | half3 test_lerp_half3(half3 p0) { return lerp(p0, p0, p0); }
|
40 | 40 |
|
41 |
| -// DXIL_NATIVE_HALF: %hlsl.lerp = call <4 x half> @llvm.dx.lerp.v4f16(<4 x half> %0, <4 x half> %1, <4 x half> %2) |
42 |
| -// SPIR_NATIVE_HALF: %hlsl.lerp = call <4 x half> @llvm.spv.lerp.v4f16(<4 x half> %0, <4 x half> %1, <4 x half> %2) |
| 41 | +// DXIL_NATIVE_HALF: %hlsl.lerp = call <4 x half> @llvm.dx.lerp.v4f16(<4 x half> %{{.*}}, <4 x half> %{{.*}}, <4 x half> %{{.*}}) |
| 42 | +// SPIR_NATIVE_HALF: %hlsl.lerp = call <4 x half> @llvm.spv.lerp.v4f16(<4 x half> %{{.*}}, <4 x half> %{{.*}}, <4 x half> %{{.*}}) |
43 | 43 | // NATIVE_HALF: ret <4 x half> %hlsl.lerp
|
44 |
| -// DXIL_NO_HALF: %hlsl.lerp = call <4 x float> @llvm.dx.lerp.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2) |
45 |
| -// SPIR_NO_HALF: %hlsl.lerp = call <4 x float> @llvm.spv.lerp.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2) |
| 44 | +// DXIL_NO_HALF: %hlsl.lerp = call <4 x float> @llvm.dx.lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x float> %{{.*}}) |
| 45 | +// SPIR_NO_HALF: %hlsl.lerp = call <4 x float> @llvm.spv.lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x float> %{{.*}}) |
46 | 46 | // NO_HALF: ret <4 x float> %hlsl.lerp
|
47 | 47 | half4 test_lerp_half4(half4 p0) { return lerp(p0, p0, p0); }
|
48 | 48 |
|
49 |
| -// DXIL_CHECK: %hlsl.lerp = call float @llvm.dx.lerp.f32(float %0, float %1, float %2) |
50 |
| -// SPIR_CHECK: %hlsl.lerp = call float @llvm.spv.lerp.f32(float %0, float %1, float %2) |
| 49 | +// DXIL_CHECK: %hlsl.lerp = call float @llvm.dx.lerp.f32(float %{{.*}}, float %{{.*}}, float %{{.*}}) |
| 50 | +// SPIR_CHECK: %hlsl.lerp = call float @llvm.spv.lerp.f32(float %{{.*}}, float %{{.*}}, float %{{.*}}) |
51 | 51 | // CHECK: ret float %hlsl.lerp
|
52 | 52 | float test_lerp_float(float p0) { return lerp(p0, p0, p0); }
|
53 | 53 |
|
54 |
| -// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2) |
55 |
| -// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2) |
| 54 | +// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %{{.*}}, <2 x float> %{{.*}}, <2 x float> %{{.*}}) |
| 55 | +// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %{{.*}}, <2 x float> %{{.*}}, <2 x float> %{{.*}}) |
56 | 56 | // CHECK: ret <2 x float> %hlsl.lerp
|
57 | 57 | float2 test_lerp_float2(float2 p0) { return lerp(p0, p0, p0); }
|
58 | 58 |
|
59 |
| -// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2) |
60 |
| -// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2) |
| 59 | +// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %{{.*}}, <3 x float> %{{.*}}, <3 x float> %{{.*}}) |
| 60 | +// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %{{.*}}, <3 x float> %{{.*}}, <3 x float> %{{.*}}) |
61 | 61 | // CHECK: ret <3 x float> %hlsl.lerp
|
62 | 62 | float3 test_lerp_float3(float3 p0) { return lerp(p0, p0, p0); }
|
63 | 63 |
|
64 |
| -// DXIL_CHECK: %hlsl.lerp = call <4 x float> @llvm.dx.lerp.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2) |
65 |
| -// SPIR_CHECK: %hlsl.lerp = call <4 x float> @llvm.spv.lerp.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2) |
| 64 | +// DXIL_CHECK: %hlsl.lerp = call <4 x float> @llvm.dx.lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x float> %{{.*}}) |
| 65 | +// SPIR_CHECK: %hlsl.lerp = call <4 x float> @llvm.spv.lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x float> %{{.*}}) |
66 | 66 | // CHECK: ret <4 x float> %hlsl.lerp
|
67 | 67 | float4 test_lerp_float4(float4 p0) { return lerp(p0, p0, p0); }
|
68 | 68 |
|
69 |
| -// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %splat.splat, <2 x float> %1, <2 x float> %2) |
70 |
| -// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %splat.splat, <2 x float> %1, <2 x float> %2) |
| 69 | +// CHECK: %[[b:.*]] = load <2 x float>, ptr %p1.addr, align 8 |
| 70 | +// CHECK: %[[c:.*]] = load <2 x float>, ptr %p1.addr, align 8 |
| 71 | +// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %splat.splat, <2 x float> %[[b]], <2 x float> %[[c]]) |
| 72 | +// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %splat.splat, <2 x float> %[[b]], <2 x float> %[[c]]) |
71 | 73 | // CHECK: ret <2 x float> %hlsl.lerp
|
72 | 74 | float2 test_lerp_float2_splat(float p0, float2 p1) { return lerp(p0, p1, p1); }
|
73 | 75 |
|
74 |
| -// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %splat.splat, <3 x float> %1, <3 x float> %2) |
75 |
| -// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %splat.splat, <3 x float> %1, <3 x float> %2) |
| 76 | +// CHECK: %[[b:.*]] = load <3 x float>, ptr %p1.addr, align 16 |
| 77 | +// CHECK: %[[c:.*]] = load <3 x float>, ptr %p1.addr, align 16 |
| 78 | +// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %splat.splat, <3 x float> %[[b]], <3 x float> %[[c]]) |
| 79 | +// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %splat.splat, <3 x float> %[[b]], <3 x float> %[[c]]) |
76 | 80 | // CHECK: ret <3 x float> %hlsl.lerp
|
77 | 81 | float3 test_lerp_float3_splat(float p0, float3 p1) { return lerp(p0, p1, p1); }
|
78 | 82 |
|
79 |
| -// DXIL_CHECK: %hlsl.lerp = call <4 x float> @llvm.dx.lerp.v4f32(<4 x float> %splat.splat, <4 x float> %1, <4 x float> %2) |
80 |
| -// SPIR_CHECK: %hlsl.lerp = call <4 x float> @llvm.spv.lerp.v4f32(<4 x float> %splat.splat, <4 x float> %1, <4 x float> %2) |
| 83 | +// CHECK: %[[b:.*]] = load <4 x float>, ptr %p1.addr, align 16 |
| 84 | +// CHECK: %[[c:.*]] = load <4 x float>, ptr %p1.addr, align 16 |
| 85 | +// DXIL_CHECK: %hlsl.lerp = call <4 x float> @llvm.dx.lerp.v4f32(<4 x float> %splat.splat, <4 x float> %[[b]], <4 x float> %[[c]]) |
| 86 | +// SPIR_CHECK: %hlsl.lerp = call <4 x float> @llvm.spv.lerp.v4f32(<4 x float> %splat.splat, <4 x float> %[[b]], <4 x float> %[[c]]) |
81 | 87 | // CHECK: ret <4 x float> %hlsl.lerp
|
82 | 88 | float4 test_lerp_float4_splat(float p0, float4 p1) { return lerp(p0, p1, p1); }
|
83 | 89 |
|
84 |
| -// CHECK: %conv = sitofp i32 %2 to float |
| 90 | +// CHECK: %[[a:.*]] = load <2 x float>, ptr %p0.addr, align 8 |
| 91 | +// CHECK: %[[b:.*]] = load <2 x float>, ptr %p0.addr, align 8 |
| 92 | +// CHECK: %conv = sitofp i32 {{.*}} to float |
85 | 93 | // CHECK: %splat.splatinsert = insertelement <2 x float> poison, float %conv, i64 0
|
86 | 94 | // CHECK: %splat.splat = shufflevector <2 x float> %splat.splatinsert, <2 x float> poison, <2 x i32> zeroinitializer
|
87 |
| -// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %splat.splat) |
88 |
| -// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %splat.splat) |
| 95 | +// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %[[a]], <2 x float> %[[b]], <2 x float> %splat.splat) |
| 96 | +// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %[[a]], <2 x float> %[[b]], <2 x float> %splat.splat) |
89 | 97 | // CHECK: ret <2 x float> %hlsl.lerp
|
90 | 98 | float2 test_lerp_float2_int_splat(float2 p0, int p1) {
|
91 | 99 | return lerp(p0, p0, p1);
|
92 | 100 | }
|
93 | 101 |
|
94 |
| -// CHECK: %conv = sitofp i32 %2 to float |
| 102 | +// CHECK: %[[a:.*]] = load <3 x float>, ptr %p0.addr, align 16 |
| 103 | +// CHECK: %[[b:.*]] = load <3 x float>, ptr %p0.addr, align 16 |
| 104 | +// CHECK: %conv = sitofp i32 {{.*}} to float |
95 | 105 | // CHECK: %splat.splatinsert = insertelement <3 x float> poison, float %conv, i64 0
|
96 | 106 | // CHECK: %splat.splat = shufflevector <3 x float> %splat.splatinsert, <3 x float> poison, <3 x i32> zeroinitializer
|
97 |
| -// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %splat.splat) |
98 |
| -// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %splat.splat) |
| 107 | +// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %[[a]], <3 x float> %[[b]], <3 x float> %splat.splat) |
| 108 | +// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %[[a]], <3 x float> %[[b]], <3 x float> %splat.splat) |
99 | 109 | // CHECK: ret <3 x float> %hlsl.lerp
|
100 | 110 | float3 test_lerp_float3_int_splat(float3 p0, int p1) {
|
101 | 111 | return lerp(p0, p0, p1);
|
|
0 commit comments