[llvm] [LLVM][SelectionDAG] Simplify SplitVecOp_VSETCC. (PR #139295)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Mon May 12 04:41:07 PDT 2025
================
@@ -4343,9 +4343,10 @@ SDValue DAGTypeLegalizer::SplitVecOp_VSETCC(SDNode *N) {
auto PartEltCnt = Lo0.getValueType().getVectorElementCount();
- LLVMContext &Context = *DAG.getContext();
- EVT PartResVT = EVT::getVectorVT(Context, MVT::i1, PartEltCnt);
- EVT WideResVT = EVT::getVectorVT(Context, MVT::i1, PartEltCnt*2);
+ EVT VT = N->getValueType(0);
+ EVT PartResVT = VT.getHalfNumVectorElementsVT(*DAG.getContext());
----------------
paulwalker-arm wrote:
I've simplified the code to construct `PartResVT` using the type of the already split operand.
https://github.com/llvm/llvm-project/pull/139295
More information about the llvm-commits
mailing list