[PATCH] D81779: [SelectionDAG] Add MVT::bf16 to getConstantFP()
Aaron Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 12 18:15:28 PDT 2020
asmith created this revision.
asmith added a reviewer: stuij.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
This was probably overlooked in recent bfloat patches.
Needed to handle bf16 constants in SelectionDAG.
ConstantFP:bf16<APFloat(0)>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D81779
Files:
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1394,7 +1394,7 @@
else if (EltVT == MVT::f64)
return getConstantFP(APFloat(Val), DL, VT, isTarget);
else if (EltVT == MVT::f80 || EltVT == MVT::f128 || EltVT == MVT::ppcf128 ||
- EltVT == MVT::f16) {
+ EltVT == MVT::f16 || EltVT == MVT::bf16) {
bool Ignored;
APFloat APF = APFloat(Val);
APF.convert(EVTToAPFloatSemantics(EltVT), APFloat::rmNearestTiesToEven,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81779.270552.patch
Type: text/x-patch
Size: 633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200613/2d31b112/attachment.bin>
More information about the llvm-commits
mailing list