arsenm accepted this revision. arsenm added a comment. This revision is now accepted and ready to land.
LGTM. with nits The lower could handle the vector case easily, but it didn't before either ================ Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2915 + SDValue Op = Node->getOperand(0); + if (Op.getValueType() == MVT::bf16) + Op = DAG.getNode(ISD::ANY_EXTEND, dl, MVT::i32, ---------------- Braces ================ Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2944 + // not supported on the target and was softened to i16 for storage. + if (Node->getValueType(0) == MVT::bf16) + Op = DAG.getNode(ISD::BITCAST, dl, MVT::bf16, ---------------- Braces ================ Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2948 + else { + assert(Node->getValueType(0).isScalarInteger()); + Op = DAG.getAnyExtOrTrunc(Op, dl, Node->getValueType(0)); ---------------- Don't see the point of this assert, should work fine for vectors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139398/new/ https://reviews.llvm.org/D139398 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits