Skip to content

Commit 0983ca9

Browse files
committed
[Backport to 16] Fix BFloat16 mangling (#3355)
The translator follows itanium mangling and per https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling __bf16 mangling should be 'DF16b'. Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
1 parent ae6e74e commit 0983ca9

File tree

8 files changed

+73
-71
lines changed

8 files changed

+73
-71
lines changed

lib/SPIRV/Mangler/ManglingUtils.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ static const char *PrimitiveNames[PRIMITIVE_NUM] = {
9393
"intel_sub_group_avc_ime_result_dual_reference_streamin_t"
9494
};
9595

96+
// clang-format off
9697
const char *MangledTypes[PRIMITIVE_NUM] = {
9798
"b", // BOOL
9899
"h", // UCHAR
@@ -106,7 +107,7 @@ const char *MangledTypes[PRIMITIVE_NUM] = {
106107
"Dh", // HALF
107108
"f", // FLOAT
108109
"d", // DOUBLE
109-
"u6__bf16", // __BF16
110+
"DF16b", // __BF16
110111
"v", // VOID
111112
"z", // VarArg
112113
"14ocl_image1d_ro", // PRIMITIVE_IMAGE1D_RO_T
@@ -175,6 +176,7 @@ const char *MangledTypes[PRIMITIVE_NUM] = {
175176
"55ocl_intel_sub_group_avc_ime_single_reference_streamin_t", // PRIMITIVE_SUB_GROUP_AVC_IME_SINGLE_REF_STREAMIN_T
176177
"53ocl_intel_sub_group_avc_ime_dual_reference_streamin_t" // PRIMITIVE_SUB_GROUP_AVC_IME_DUAL_REF_STREAMIN_T
177178
};
179+
// clang-format on
178180

179181
const char *ReadableAttribute[ATTR_NUM] = {
180182
"restrict", "volatile", "const", "__private",

lib/SPIRV/SPIRVUtil.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,8 +551,8 @@ ParamType lastFuncParamType(StringRef MangledName) {
551551
char Mangled = Copy.back();
552552
std::string Mangled2 = Copy.substr(Copy.size() - 2);
553553

554-
std::string Mangled6 = Copy.substr(Copy.size() - 6);
555-
if (Mangled6 == "__bf16") {
554+
std::string Mangled5 = Copy.substr(Copy.size() - 5);
555+
if (Mangled5 == "DF16b") {
556556
return ParamType::FLOAT;
557557
}
558558

test/extensions/INTEL/SPV_INTEL_bfloat16/bfloat16_math.ll

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -126,44 +126,44 @@ target triple = "spirv64-unknown-unknown"
126126
; CHECK-LLVM: %OpFUnordLessThanEqual = fcmp ule bfloat [[DATA1]], [[DATA2]]
127127
; CHECK-LLVM: %OpFOrdGreaterThanEqual = fcmp oge bfloat [[DATA1]], [[DATA2]]
128128
; CHECK-LLVM: %OpFUnordGreaterThanEqual = fcmp uge bfloat [[DATA1]], [[DATA2]]
129-
; CHECK-LLVM: %fabs = call spir_func bfloat @_Z4fabsu6__bf16(bfloat [[DATA1]])
130-
; CHECK-LLVM: %fclamp = call spir_func bfloat @_Z5clampu6__bf16u6__bf16u6__bf16(bfloat [[DATA1]], bfloat [[DATA2]], bfloat [[DATA3]])
131-
; CHECK-LLVM: %fma = call spir_func bfloat @_Z3fmau6__bf16u6__bf16u6__bf16(bfloat [[DATA1]], bfloat [[DATA2]], bfloat [[DATA3]])
132-
; CHECK-LLVM: %fmax = call spir_func bfloat @_Z4fmaxu6__bf16u6__bf16(bfloat [[DATA1]], bfloat [[DATA2]])
133-
; CHECK-LLVM: %fmin = call spir_func bfloat @_Z4fminu6__bf16u6__bf16(bfloat [[DATA1]], bfloat [[DATA2]])
134-
; CHECK-LLVM: %mad = call spir_func bfloat @_Z3madu6__bf16u6__bf16u6__bf16(bfloat [[DATA1]], bfloat [[DATA2]], bfloat [[DATA3]])
135-
; CHECK-LLVM: %nan = call spir_func bfloat @_Z3nanu6__bf16(bfloat [[DATA1]])
136-
; CHECK-LLVM: %native_cos = call spir_func bfloat @_Z10native_cosu6__bf16(bfloat [[DATA1]])
137-
; CHECK-LLVM: %native_divide = call spir_func bfloat @_Z13native_divideu6__bf16u6__bf16(bfloat [[DATA1]], bfloat [[DATA2]])
138-
; CHECK-LLVM: %native_exp = call spir_func bfloat @_Z10native_expu6__bf16(bfloat [[DATA1]])
139-
; CHECK-LLVM: %native_exp10 = call spir_func bfloat @_Z12native_exp10u6__bf16(bfloat [[DATA1]])
140-
; CHECK-LLVM: %native_exp2 = call spir_func bfloat @_Z11native_exp2u6__bf16(bfloat [[DATA1]])
141-
; CHECK-LLVM: %native_log = call spir_func bfloat @_Z10native_logu6__bf16(bfloat [[DATA1]])
142-
; CHECK-LLVM: %native_log10 = call spir_func bfloat @_Z12native_log10u6__bf16(bfloat [[DATA1]])
143-
; CHECK-LLVM: %native_log2 = call spir_func bfloat @_Z11native_log2u6__bf16(bfloat [[DATA1]])
144-
; CHECK-LLVM: %native_powr = call spir_func bfloat @_Z11native_powru6__bf16u6__bf16(bfloat [[DATA1]], bfloat [[DATA2]])
145-
; CHECK-LLVM: %native_recip = call spir_func bfloat @_Z12native_recipu6__bf16(bfloat [[DATA1]])
146-
; CHECK-LLVM: %native_rsqrt = call spir_func bfloat @_Z12native_rsqrtu6__bf16(bfloat [[DATA1]])
147-
; CHECK-LLVM: %native_sin = call spir_func bfloat @_Z10native_sinu6__bf16(bfloat [[DATA1]])
148-
; CHECK-LLVM: %native_sqrt = call spir_func bfloat @_Z11native_sqrtu6__bf16(bfloat [[DATA1]])
149-
; CHECK-LLVM: %native_tan = call spir_func bfloat @_Z10native_tanu6__bf16(bfloat [[DATA1]])
129+
; CHECK-LLVM: %fabs = call spir_func bfloat @_Z4fabsDF16b(bfloat [[DATA1]])
130+
; CHECK-LLVM: %fclamp = call spir_func bfloat @_Z5clampDF16bDF16bDF16b(bfloat [[DATA1]], bfloat [[DATA2]], bfloat [[DATA3]])
131+
; CHECK-LLVM: %fma = call spir_func bfloat @_Z3fmaDF16bDF16bDF16b(bfloat [[DATA1]], bfloat [[DATA2]], bfloat [[DATA3]])
132+
; CHECK-LLVM: %fmax = call spir_func bfloat @_Z4fmaxDF16bDF16b(bfloat [[DATA1]], bfloat [[DATA2]])
133+
; CHECK-LLVM: %fmin = call spir_func bfloat @_Z4fminDF16bDF16b(bfloat [[DATA1]], bfloat [[DATA2]])
134+
; CHECK-LLVM: %mad = call spir_func bfloat @_Z3madDF16bDF16bDF16b(bfloat [[DATA1]], bfloat [[DATA2]], bfloat [[DATA3]])
135+
; CHECK-LLVM: %nan = call spir_func bfloat @_Z3nanDF16b(bfloat [[DATA1]])
136+
; CHECK-LLVM: %native_cos = call spir_func bfloat @_Z10native_cosDF16b(bfloat [[DATA1]])
137+
; CHECK-LLVM: %native_divide = call spir_func bfloat @_Z13native_divideDF16bDF16b(bfloat [[DATA1]], bfloat [[DATA2]])
138+
; CHECK-LLVM: %native_exp = call spir_func bfloat @_Z10native_expDF16b(bfloat [[DATA1]])
139+
; CHECK-LLVM: %native_exp10 = call spir_func bfloat @_Z12native_exp10DF16b(bfloat [[DATA1]])
140+
; CHECK-LLVM: %native_exp2 = call spir_func bfloat @_Z11native_exp2DF16b(bfloat [[DATA1]])
141+
; CHECK-LLVM: %native_log = call spir_func bfloat @_Z10native_logDF16b(bfloat [[DATA1]])
142+
; CHECK-LLVM: %native_log10 = call spir_func bfloat @_Z12native_log10DF16b(bfloat [[DATA1]])
143+
; CHECK-LLVM: %native_log2 = call spir_func bfloat @_Z11native_log2DF16b(bfloat [[DATA1]])
144+
; CHECK-LLVM: %native_powr = call spir_func bfloat @_Z11native_powrDF16bDF16b(bfloat [[DATA1]], bfloat [[DATA2]])
145+
; CHECK-LLVM: %native_recip = call spir_func bfloat @_Z12native_recipDF16b(bfloat [[DATA1]])
146+
; CHECK-LLVM: %native_rsqrt = call spir_func bfloat @_Z12native_rsqrtDF16b(bfloat [[DATA1]])
147+
; CHECK-LLVM: %native_sin = call spir_func bfloat @_Z10native_sinDF16b(bfloat [[DATA1]])
148+
; CHECK-LLVM: %native_sqrt = call spir_func bfloat @_Z11native_sqrtDF16b(bfloat [[DATA1]])
149+
; CHECK-LLVM: %native_tan = call spir_func bfloat @_Z10native_tanDF16b(bfloat [[DATA1]])
150150

151-
declare spir_func bfloat @_Z5clampu6__bf16u6__bf16u6__bf16(bfloat, bfloat, bfloat)
152-
declare spir_func bfloat @_Z3nanu6__bf16(bfloat)
153-
declare spir_func bfloat @_Z10native_cosu6__bf16(bfloat)
154-
declare spir_func bfloat @_Z13native_divideu6__bf16u6__bf16(bfloat, bfloat)
155-
declare spir_func bfloat @_Z10native_expu6__bf16(bfloat)
156-
declare spir_func bfloat @_Z12native_exp10u6__bf16(bfloat)
157-
declare spir_func bfloat @_Z11native_exp2u6__bf16(bfloat)
158-
declare spir_func bfloat @_Z10native_logu6__bf16(bfloat)
159-
declare spir_func bfloat @_Z12native_log10u6__bf16(bfloat)
160-
declare spir_func bfloat @_Z11native_log2u6__bf16(bfloat)
161-
declare spir_func bfloat @_Z11native_powru6__bf16u6__bf16(bfloat, bfloat)
162-
declare spir_func bfloat @_Z12native_recipu6__bf16(bfloat)
163-
declare spir_func bfloat @_Z12native_rsqrtu6__bf16(bfloat)
164-
declare spir_func bfloat @_Z10native_sinu6__bf16(bfloat)
165-
declare spir_func bfloat @_Z11native_sqrtu6__bf16(bfloat)
166-
declare spir_func bfloat @_Z10native_tanu6__bf16(bfloat)
151+
declare spir_func bfloat @_Z5clampDF16bDF16bDF16b(bfloat, bfloat, bfloat)
152+
declare spir_func bfloat @_Z3nanDF16b(bfloat)
153+
declare spir_func bfloat @_Z10native_cosDF16b(bfloat)
154+
declare spir_func bfloat @_Z13native_divideDF16bDF16b(bfloat, bfloat)
155+
declare spir_func bfloat @_Z10native_expDF16b(bfloat)
156+
declare spir_func bfloat @_Z12native_exp10DF16b(bfloat)
157+
declare spir_func bfloat @_Z11native_exp2DF16b(bfloat)
158+
declare spir_func bfloat @_Z10native_logDF16b(bfloat)
159+
declare spir_func bfloat @_Z12native_log10DF16b(bfloat)
160+
declare spir_func bfloat @_Z11native_log2DF16b(bfloat)
161+
declare spir_func bfloat @_Z11native_powrDF16bDF16b(bfloat, bfloat)
162+
declare spir_func bfloat @_Z12native_recipDF16b(bfloat)
163+
declare spir_func bfloat @_Z12native_rsqrtDF16b(bfloat)
164+
declare spir_func bfloat @_Z10native_sinDF16b(bfloat)
165+
declare spir_func bfloat @_Z11native_sqrtDF16b(bfloat)
166+
declare spir_func bfloat @_Z10native_tanDF16b(bfloat)
167167

168168
define spir_func void @OpPhi(bfloat %data1, bfloat %data2) {
169169
br label %blockA
@@ -223,26 +223,26 @@ entry:
223223
%OpFOrdGreaterThanEqual = fcmp oge bfloat %data1, %data2
224224
%OpFUnordGreaterThanEqual = fcmp uge bfloat %data1, %data2
225225
%fabs = call bfloat @llvm.fabs.bfloat(bfloat %data1)
226-
%fclamp = call spir_func bfloat @_Z5clampu6__bf16u6__bf16u6__bf16(bfloat %data1, bfloat %data2, bfloat %data3)
226+
%fclamp = call spir_func bfloat @_Z5clampDF16bDF16bDF16b(bfloat %data1, bfloat %data2, bfloat %data3)
227227
%fma = call bfloat @llvm.fma.bfloat(bfloat %data1, bfloat %data2, bfloat %data3)
228228
%fmax = call bfloat @llvm.maxnum.bfloat(bfloat %data1, bfloat %data2)
229229
%fmin = call bfloat @llvm.minnum.bfloat(bfloat %data1, bfloat %data2)
230230
%mad = call bfloat @llvm.fmuladd.bfloat(bfloat %data1, bfloat %data2, bfloat %data3)
231-
%nan = call spir_func bfloat @_Z3nanu6__bf16(bfloat %data1)
232-
%native_cos = call spir_func bfloat @_Z10native_cosu6__bf16(bfloat %data1)
233-
%native_divide = call spir_func bfloat @_Z13native_divideu6__bf16u6__bf16(bfloat %data1, bfloat %data2)
234-
%native_exp = call spir_func bfloat @_Z10native_expu6__bf16(bfloat %data1)
235-
%native_exp10 = call spir_func bfloat @_Z12native_exp10u6__bf16(bfloat %data1)
236-
%native_exp2 = call spir_func bfloat @_Z11native_exp2u6__bf16(bfloat %data1)
237-
%native_log = call spir_func bfloat @_Z10native_logu6__bf16(bfloat %data1)
238-
%native_log10 = call spir_func bfloat @_Z12native_log10u6__bf16(bfloat %data1)
239-
%native_log2 = call spir_func bfloat @_Z11native_log2u6__bf16(bfloat %data1)
240-
%native_powr = call spir_func bfloat @_Z11native_powru6__bf16u6__bf16(bfloat %data1, bfloat %data2)
241-
%native_recip = call spir_func bfloat @_Z12native_recipu6__bf16(bfloat %data1)
242-
%native_rsqrt = call spir_func bfloat @_Z12native_rsqrtu6__bf16(bfloat %data1)
243-
%native_sin = call spir_func bfloat @_Z10native_sinu6__bf16(bfloat %data1)
244-
%native_sqrt = call spir_func bfloat @_Z11native_sqrtu6__bf16(bfloat %data1)
245-
%native_tan = call spir_func bfloat @_Z10native_tanu6__bf16(bfloat %data1)
231+
%nan = call spir_func bfloat @_Z3nanDF16b(bfloat %data1)
232+
%native_cos = call spir_func bfloat @_Z10native_cosDF16b(bfloat %data1)
233+
%native_divide = call spir_func bfloat @_Z13native_divideDF16bDF16b(bfloat %data1, bfloat %data2)
234+
%native_exp = call spir_func bfloat @_Z10native_expDF16b(bfloat %data1)
235+
%native_exp10 = call spir_func bfloat @_Z12native_exp10DF16b(bfloat %data1)
236+
%native_exp2 = call spir_func bfloat @_Z11native_exp2DF16b(bfloat %data1)
237+
%native_log = call spir_func bfloat @_Z10native_logDF16b(bfloat %data1)
238+
%native_log10 = call spir_func bfloat @_Z12native_log10DF16b(bfloat %data1)
239+
%native_log2 = call spir_func bfloat @_Z11native_log2DF16b(bfloat %data1)
240+
%native_powr = call spir_func bfloat @_Z11native_powrDF16bDF16b(bfloat %data1, bfloat %data2)
241+
%native_recip = call spir_func bfloat @_Z12native_recipDF16b(bfloat %data1)
242+
%native_rsqrt = call spir_func bfloat @_Z12native_rsqrtDF16b(bfloat %data1)
243+
%native_sin = call spir_func bfloat @_Z10native_sinDF16b(bfloat %data1)
244+
%native_sqrt = call spir_func bfloat @_Z11native_sqrtDF16b(bfloat %data1)
245+
%native_tan = call spir_func bfloat @_Z10native_tanDF16b(bfloat %data1)
246246
ret void
247247
}
248248

test/extensions/INTEL/SPV_INTEL_shader_atomic_bfloat16/AtomicFAddEXT.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ define dso_local spir_func bfloat @test_AtomicFAddEXT_bfloat(ptr addrspace(4) al
2121
entry:
2222
%0 = addrspacecast ptr addrspace(4) %Arg to ptr addrspace(1)
2323
; CHECK-SPIRV: AtomicFAddEXT [[BFLOAT]]
24-
; CHECK-LLVM-SPV: call spir_func bfloat @_Z21__spirv_AtomicFAddEXTPU3AS1u6__bf16iiu6__bf16({{.*}}bfloat
25-
%ret = tail call spir_func bfloat @_Z21__spirv_AtomicFAddEXTPU3AS1u6__bf16iiu6__bf16(ptr addrspace(1) %0, i32 1, i32 896, bfloat 1.000000e+00)
24+
; CHECK-LLVM-SPV: call spir_func bfloat @_Z21__spirv_AtomicFAddEXTPU3AS1DF16biiDF16b({{.*}}bfloat
25+
%ret = tail call spir_func bfloat @_Z21__spirv_AtomicFAddEXTPU3AS1DF16biiDF16b(ptr addrspace(1) %0, i32 1, i32 896, bfloat 1.000000e+00)
2626
ret bfloat %ret
2727
}
2828

2929
; Function Attrs: convergent
30-
declare dso_local spir_func bfloat @_Z21__spirv_AtomicFAddEXTPU3AS1u6__bf16iiu6__bf16(ptr addrspace(1), i32, i32, bfloat)
30+
declare dso_local spir_func bfloat @_Z21__spirv_AtomicFAddEXTPU3AS1DF16biiDF16b(ptr addrspace(1), i32, i32, bfloat)

test/extensions/INTEL/SPV_INTEL_shader_atomic_bfloat16/AtomicFMaxEXT.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ define dso_local spir_func bfloat @test_AtomicFMaxEXT_bfloat(ptr addrspace(4) al
2121
entry:
2222
%0 = addrspacecast ptr addrspace(4) %Arg to ptr addrspace(1)
2323
; CHECK-SPIRV: AtomicFMaxEXT [[BFLOAT]]
24-
; CHECK-LLVM-SPV: call spir_func bfloat @_Z21__spirv_AtomicFMaxEXTPU3AS1u6__bf16iiu6__bf16({{.*}}bfloat
25-
%ret = tail call spir_func bfloat @_Z21__spirv_AtomicFMaxEXTPU3AS1u6__bf16iiu6__bf16(ptr addrspace(1) %0, i32 1, i32 896, bfloat 1.000000e+00)
24+
; CHECK-LLVM-SPV: call spir_func bfloat @_Z21__spirv_AtomicFMaxEXTPU3AS1DF16biiDF16b({{.*}}bfloat
25+
%ret = tail call spir_func bfloat @_Z21__spirv_AtomicFMaxEXTPU3AS1DF16biiDF16b(ptr addrspace(1) %0, i32 1, i32 896, bfloat 1.000000e+00)
2626
ret bfloat %ret
2727
}
2828

2929
; Function Attrs: convergent
30-
declare dso_local spir_func bfloat @_Z21__spirv_AtomicFMaxEXTPU3AS1u6__bf16iiu6__bf16(ptr addrspace(1), i32, i32, bfloat)
30+
declare dso_local spir_func bfloat @_Z21__spirv_AtomicFMaxEXTPU3AS1DF16biiDF16b(ptr addrspace(1), i32, i32, bfloat)

test/extensions/INTEL/SPV_INTEL_shader_atomic_bfloat16/AtomicFMinEXT.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ define dso_local spir_func bfloat @test_AtomicFMinEXT_bfloat(ptr addrspace(4) al
2121
entry:
2222
%0 = addrspacecast ptr addrspace(4) %Arg to ptr addrspace(1)
2323
; CHECK-SPIRV: AtomicFMinEXT [[BFLOAT]]
24-
; CHECK-LLVM-SPV: call spir_func bfloat @_Z21__spirv_AtomicFMinEXTPU3AS1u6__bf16iiu6__bf16({{.*}}bfloat
25-
%ret = tail call spir_func bfloat @_Z21__spirv_AtomicFMinEXTPU3AS1u6__bf16iiu6__bf16(ptr addrspace(1) %0, i32 1, i32 896, bfloat 1.000000e+00)
24+
; CHECK-LLVM-SPV: call spir_func bfloat @_Z21__spirv_AtomicFMinEXTPU3AS1DF16biiDF16b({{.*}}bfloat
25+
%ret = tail call spir_func bfloat @_Z21__spirv_AtomicFMinEXTPU3AS1DF16biiDF16b(ptr addrspace(1) %0, i32 1, i32 896, bfloat 1.000000e+00)
2626
ret bfloat %ret
2727
}
2828

2929
; Function Attrs: convergent
30-
declare dso_local spir_func bfloat @_Z21__spirv_AtomicFMinEXTPU3AS1u6__bf16iiu6__bf16(ptr addrspace(1), i32, i32, bfloat)
30+
declare dso_local spir_func bfloat @_Z21__spirv_AtomicFMinEXTPU3AS1DF16biiDF16b(ptr addrspace(1), i32, i32, bfloat)

test/extensions/KHR/SPV_KHR_bfloat16/bfloat16_dot.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ target triple = "spirv64-unknown-unknown"
2020
; CHECK-LLVM: %addrB = alloca <2 x bfloat>
2121
; CHECK-LLVM: %dataA = load <2 x bfloat>, ptr %addrA
2222
; CHECK-LLVM: %dataB = load <2 x bfloat>, ptr %addrB
23-
; CHECK-LLVM: %call = call spir_func bfloat @_Z3dotDv2_u6__bf16S_(<2 x bfloat> %dataA, <2 x bfloat> %dataB)
23+
; CHECK-LLVM: %call = call spir_func bfloat @_Z3dotDv2_DF16bS_(<2 x bfloat> %dataA, <2 x bfloat> %dataB)
2424

25-
declare spir_func bfloat @_Z3dotDv2_u6__bf16Dv2_S_(<2 x bfloat>, <2 x bfloat>)
25+
declare spir_func bfloat @_Z3dotDv2_DF16bDv2_S_(<2 x bfloat>, <2 x bfloat>)
2626

2727
define spir_kernel void @test() {
2828
entry:
2929
%addrA = alloca <2 x bfloat>
3030
%addrB = alloca <2 x bfloat>
3131
%dataA = load <2 x bfloat>, ptr %addrA
3232
%dataB = load <2 x bfloat>, ptr %addrB
33-
%call = call spir_func bfloat @_Z3dotDv2_u6__bf16Dv2_S_(<2 x bfloat> %dataA, <2 x bfloat> %dataB)
33+
%call = call spir_func bfloat @_Z3dotDv2_DF16bDv2_S_(<2 x bfloat> %dataA, <2 x bfloat> %dataB)
3434
ret void
3535
}
3636

test/extensions/KHR/SPV_KHR_bfloat16/cooperative_matrix_bfloat16.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
; CHECK-SPIRV-DAG: Constant [[#BFloatTy]] [[#]] 16256
2222
; CHECK-SPIRV: CompositeConstruct [[#MatTy]]
2323

24-
; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", bfloat, 3, 12, 12, 2) @_Z26__spirv_CompositeConstructu6__bf16(bfloat 0xR3F80)
24+
; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", bfloat, 3, 12, 12, 2) @_Z26__spirv_CompositeConstructDF16b(bfloat 0xR3F80)
2525

2626
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64"
2727
target triple = "spir64-unknown-unknown"
2828

29-
declare spir_func target("spirv.CooperativeMatrixKHR", bfloat, 3, 12, 12, 2) @_Z26__spirv_CompositeConstructu6__bf16(bfloat)
29+
declare spir_func target("spirv.CooperativeMatrixKHR", bfloat, 3, 12, 12, 2) @_Z26__spirv_CompositeConstructDF16b(bfloat)
3030

3131
define spir_kernel void @test() {
32-
%mat = call spir_func target("spirv.CooperativeMatrixKHR", bfloat, 3, 12, 12, 2) @_Z26__spirv_CompositeConstructu6__bf16(bfloat 1.0)
32+
%mat = call spir_func target("spirv.CooperativeMatrixKHR", bfloat, 3, 12, 12, 2) @_Z26__spirv_CompositeConstructDF16b(bfloat 1.0)
3333
ret void
3434
}

0 commit comments

Comments
 (0)