Skip to content

Commit 482b697

Browse files
igorban-inteligcbot
authored andcommitted
Add cm_cl builtin for fdiv_ieee
.
1 parent 4a09bac commit 482b697

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

IGC/VectorCompiler/CMCL/lib/Headers/cm-cl/detail/builtins.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ template <typename T> T __cm_cl_powr(T src0, T src1, bool use_fast);
147147
template <typename T> T __cm_cl_sin(T src, bool use_fast);
148148
template <typename T> T __cm_cl_cos(T src, bool use_fast);
149149

150+
template <typename T> T __cm_cl_fdiv_ieee(T src0, T src1);
150151
template <typename T> T __cm_cl_rsqrt(T src);
151152

152153
vector_impl<uint32_t, 3> __cm_cl_local_id();

IGC/VectorCompiler/CMCL/lib/Support/TranslationDescription.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,23 @@
402402
]
403403
}
404404
},
405+
"FDiv": {
406+
"Name": "fdiv_ieee",
407+
"Operands": [
408+
{"Name": "FirstSrc", "Kind": "Input"},
409+
{"Name": "SecondSrc", "Kind": "Input"}
410+
],
411+
"TranslateInto": {
412+
"VC-Intrinsic": "genx_ieee_div",
413+
"ReturnType": {
414+
"GetBuiltinReturnType": []
415+
},
416+
"Operands": [
417+
{"GetBuiltinOperand": ["FirstSrc"]},
418+
{"GetBuiltinOperand": ["SecondSrc"]}
419+
]
420+
}
421+
},
405422
"RSQRT": {
406423
"Name": "rsqrt",
407424
"Operands": [

0 commit comments

Comments
 (0)