[llvm] [RISCV] Support Strict FP arithmetic Op when only have Zvfhmin (PR #68867)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 28 15:41:32 PDT 2023
================
@@ -634,6 +636,38 @@ void VectorLegalizer::PromoteSETCC(SDNode *Node,
Results.push_back(Res);
}
+void VectorLegalizer::PromoteSTRICT(SDNode *Node,
+ SmallVectorImpl<SDValue> &Results) {
+ MVT VecVT = Node->getOperand(1).getSimpleValueType();
+ MVT NewVecVT = TLI.getTypeToPromoteTo(Node->getOpcode(), VecVT);
+
+ assert(VecVT.isFloatingPoint());
+
+ SDLoc DL(Node);
+ SmallVector<SDValue, 5> Operands(Node->getNumOperands());
+
+ for (unsigned j = 0; j != Node->getNumOperands(); ++j)
+ if (Node->getOperand(j).getValueType().isVector() &&
+ !(ISD::isVPOpcode(Node->getOpcode()) &&
+ ISD::getVPMaskIdx(Node->getOpcode()) == j)) // Skip mask operand.
+ // promote the vector operand.
+ Operands[j] =
+ DAG.getNode(ISD::FP_EXTEND, DL, NewVecVT, Node->getOperand(j));
----------------
topperc wrote:
Why aren't the inserted nodes also STRICT?
https://github.com/llvm/llvm-project/pull/68867
More information about the llvm-commits
mailing list