Skip to content

Commit 90b04bf

Browse files
authored
[NFC] fix up typos (#121842)
Fix Tablegen typo to indicate SPIRV and not HLSL Fix miscellaneous test case typos.
1 parent 9709795 commit 90b04bf

File tree

5 files changed

+23
-21
lines changed

5 files changed

+23
-21
lines changed

clang/include/clang/Basic/BuiltinsSPIRV.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
include "clang/Basic/BuiltinsBase.td"
1010

11-
def HLSLDistance : Builtin {
11+
def SPIRVDistance : Builtin {
1212
let Spellings = ["__builtin_spirv_distance"];
1313
let Attributes = [NoThrow, Const];
1414
let Prototype = "void(...)";

llvm/test/CodeGen/SPIRV/hlsl-intrinsics/cross.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ entry:
1515
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#vec3_float_16]]
1616
; CHECK: %[[#arg1:]] = OpFunctionParameter %[[#vec3_float_16]]
1717
; CHECK: %[[#]] = OpExtInst %[[#vec3_float_16]] %[[#op_ext_glsl]] Cross %[[#arg0]] %[[#arg1]]
18-
%hlsl.cross = call <3 x half> @llvm.spv.cross.v4f16(<3 x half> %a, <3 x half> %b)
18+
%hlsl.cross = call <3 x half> @llvm.spv.cross.v3f16(<3 x half> %a, <3 x half> %b)
1919
ret <3 x half> %hlsl.cross
2020
}
2121

@@ -25,9 +25,9 @@ entry:
2525
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#vec3_float_32]]
2626
; CHECK: %[[#arg1:]] = OpFunctionParameter %[[#vec3_float_32]]
2727
; CHECK: %[[#]] = OpExtInst %[[#vec3_float_32]] %[[#op_ext_glsl]] Cross %[[#arg0]] %[[#arg1]]
28-
%hlsl.cross = call <3 x float> @llvm.spv.cross.v4f32(<3 x float> %a, <3 x float> %b)
28+
%hlsl.cross = call <3 x float> @llvm.spv.cross.v3f32(<3 x float> %a, <3 x float> %b)
2929
ret <3 x float> %hlsl.cross
3030
}
3131

32-
declare <3 x half> @llvm.spv.cross.v4f16(<3 x half>, <3 x half>)
33-
declare <3 x float> @llvm.spv.cross.v4f32(<3 x float>, <3 x float>)
32+
declare <3 x half> @llvm.spv.cross.v3f16(<3 x half>, <3 x half>)
33+
declare <3 x float> @llvm.spv.cross.v3f32(<3 x float>, <3 x float>)

llvm/test/CodeGen/SPIRV/hlsl-intrinsics/length.ll

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,21 @@
1111

1212
define noundef half @length_half4(<4 x half> noundef %a) {
1313
entry:
14-
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]
14+
; CHECK: %[[#]] = OpFunction %[[#float_16]] None %[[#]]
15+
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#vec4_float_16]]
1516
; CHECK: %[[#]] = OpExtInst %[[#float_16]] %[[#op_ext_glsl]] Length %[[#arg0]]
16-
%hlsl.length = call half @llvm.spv.length.v4f16(<4 x half> %a)
17+
%hlsl.length = call half @llvm.spv.length.f16(<4 x half> %a)
1718
ret half %hlsl.length
1819
}
1920

2021
define noundef float @length_float4(<4 x float> noundef %a) {
2122
entry:
22-
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]
23+
; CHECK: %[[#]] = OpFunction %[[#float_32]] None %[[#]]
24+
; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#vec4_float_32]]
2325
; CHECK: %[[#]] = OpExtInst %[[#float_32]] %[[#op_ext_glsl]] Length %[[#arg0]]
24-
%hlsl.length = call float @llvm.spv.length.v4f32(<4 x float> %a)
26+
%hlsl.length = call float @llvm.spv.length.f32(<4 x float> %a)
2527
ret float %hlsl.length
2628
}
2729

28-
declare half @llvm.spv.length.v4f16(<4 x half>)
29-
declare float @llvm.spv.length.v4f32(<4 x float>)
30+
declare half @llvm.spv.length.f16(<4 x half>)
31+
declare float @llvm.spv.length.f32(<4 x float>)

llvm/test/CodeGen/SPIRV/opencl/degrees.ll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
44
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
55

6-
; CHECK-DAG: %[[#op_ext_glsl:]] = OpExtInstImport "OpenCL.std"
6+
; CHECK-DAG: %[[#op_ext_ocl:]] = OpExtInstImport "OpenCL.std"
77

88
; CHECK-DAG: %[[#float_32:]] = OpTypeFloat 32
99
; CHECK-DAG: %[[#float_16:]] = OpTypeFloat 16
@@ -20,31 +20,31 @@ declare <4 x half> @llvm.spv.degrees.v4f16(<4 x half>)
2020
define noundef float @degrees_float(float noundef %a) {
2121
entry:
2222
; CHECK: %[[#float_32_arg:]] = OpFunctionParameter %[[#float_32]]
23-
; CHECK: %[[#]] = OpExtInst %[[#float_32]] %[[#op_ext_glsl]] degrees %[[#float_32_arg]]
23+
; CHECK: %[[#]] = OpExtInst %[[#float_32]] %[[#op_ext_ocl]] degrees %[[#float_32_arg]]
2424
%elt.degrees = call float @llvm.spv.degrees.f32(float %a)
2525
ret float %elt.degrees
2626
}
2727

2828
define noundef half @degrees_half(half noundef %a) {
2929
entry:
3030
; CHECK: %[[#float_16_arg:]] = OpFunctionParameter %[[#float_16]]
31-
; CHECK: %[[#]] = OpExtInst %[[#float_16]] %[[#op_ext_glsl]] degrees %[[#float_16_arg]]
31+
; CHECK: %[[#]] = OpExtInst %[[#float_16]] %[[#op_ext_ocl]] degrees %[[#float_16_arg]]
3232
%elt.degrees = call half @llvm.spv.degrees.f16(half %a)
3333
ret half %elt.degrees
3434
}
3535

3636
define noundef <4 x float> @degrees_float_vector(<4 x float> noundef %a) {
3737
entry:
3838
; CHECK: %[[#vec4_float_32_arg:]] = OpFunctionParameter %[[#vec4_float_32]]
39-
; CHECK: %[[#]] = OpExtInst %[[#vec4_float_32]] %[[#op_ext_glsl]] degrees %[[#vec4_float_32_arg]]
39+
; CHECK: %[[#]] = OpExtInst %[[#vec4_float_32]] %[[#op_ext_ocl]] degrees %[[#vec4_float_32_arg]]
4040
%elt.degrees = call <4 x float> @llvm.spv.degrees.v4f32(<4 x float> %a)
4141
ret <4 x float> %elt.degrees
4242
}
4343

4444
define noundef <4 x half> @degrees_half_vector(<4 x half> noundef %a) {
4545
entry:
4646
; CHECK: %[[#vec4_float_16_arg:]] = OpFunctionParameter %[[#vec4_float_16]]
47-
; CHECK: %[[#]] = OpExtInst %[[#vec4_float_16]] %[[#op_ext_glsl]] degrees %[[#vec4_float_16_arg]]
47+
; CHECK: %[[#]] = OpExtInst %[[#vec4_float_16]] %[[#op_ext_ocl]] degrees %[[#vec4_float_16_arg]]
4848
%elt.degrees = call <4 x half> @llvm.spv.degrees.v4f16(<4 x half> %a)
4949
ret <4 x half> %elt.degrees
5050
}

llvm/test/CodeGen/SPIRV/opencl/radians.ll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
44
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
55

6-
; CHECK-DAG: %[[#op_ext_glsl:]] = OpExtInstImport "OpenCL.std"
6+
; CHECK-DAG: %[[#op_ext_ocl:]] = OpExtInstImport "OpenCL.std"
77

88
; CHECK-DAG: %[[#float_32:]] = OpTypeFloat 32
99
; CHECK-DAG: %[[#float_16:]] = OpTypeFloat 16
@@ -20,31 +20,31 @@ declare <4 x half> @llvm.spv.radians.v4f16(<4 x half>)
2020
define noundef float @radians_float(float noundef %a) {
2121
entry:
2222
; CHECK: %[[#float_32_arg:]] = OpFunctionParameter %[[#float_32]]
23-
; CHECK: %[[#]] = OpExtInst %[[#float_32]] %[[#op_ext_glsl]] radians %[[#float_32_arg]]
23+
; CHECK: %[[#]] = OpExtInst %[[#float_32]] %[[#op_ext_ocl]] radians %[[#float_32_arg]]
2424
%elt.radians = call float @llvm.spv.radians.f32(float %a)
2525
ret float %elt.radians
2626
}
2727

2828
define noundef half @radians_half(half noundef %a) {
2929
entry:
3030
; CHECK: %[[#float_16_arg:]] = OpFunctionParameter %[[#float_16]]
31-
; CHECK: %[[#]] = OpExtInst %[[#float_16]] %[[#op_ext_glsl]] radians %[[#float_16_arg]]
31+
; CHECK: %[[#]] = OpExtInst %[[#float_16]] %[[#op_ext_ocl]] radians %[[#float_16_arg]]
3232
%elt.radians = call half @llvm.spv.radians.f16(half %a)
3333
ret half %elt.radians
3434
}
3535

3636
define noundef <4 x float> @radians_float_vector(<4 x float> noundef %a) {
3737
entry:
3838
; CHECK: %[[#vec4_float_32_arg:]] = OpFunctionParameter %[[#vec4_float_32]]
39-
; CHECK: %[[#]] = OpExtInst %[[#vec4_float_32]] %[[#op_ext_glsl]] radians %[[#vec4_float_32_arg]]
39+
; CHECK: %[[#]] = OpExtInst %[[#vec4_float_32]] %[[#op_ext_ocl]] radians %[[#vec4_float_32_arg]]
4040
%elt.radians = call <4 x float> @llvm.spv.radians.v4f32(<4 x float> %a)
4141
ret <4 x float> %elt.radians
4242
}
4343

4444
define noundef <4 x half> @radians_half_vector(<4 x half> noundef %a) {
4545
entry:
4646
; CHECK: %[[#vec4_float_16_arg:]] = OpFunctionParameter %[[#vec4_float_16]]
47-
; CHECK: %[[#]] = OpExtInst %[[#vec4_float_16]] %[[#op_ext_glsl]] radians %[[#vec4_float_16_arg]]
47+
; CHECK: %[[#]] = OpExtInst %[[#vec4_float_16]] %[[#op_ext_ocl]] radians %[[#vec4_float_16_arg]]
4848
%elt.radians = call <4 x half> @llvm.spv.radians.v4f16(<4 x half> %a)
4949
ret <4 x half> %elt.radians
5050
}

0 commit comments

Comments
 (0)