Skip to content

Commit bdb1ab9

Browse files
committed
[LegalizeTypes][VP] Use LoVT/HiVT when splitting VP operations in SplitVecRes_UnaryOp.
The VP path was using the split source VTs instead of the split destination VTs. This may not be a problem today because the VP nodes going through this have the same source and dest VTs. It will be a problem when we start using this function for legalizing VP cast operations.
1 parent 912551d commit bdb1ab9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2110,10 +2110,8 @@ void DAGTypeLegalizer::SplitVecRes_UnaryOp(SDNode *N, SDValue &Lo,
21102110
std::tie(EVLLo, EVLHi) =
21112111
DAG.SplitEVL(N->getOperand(2), N->getValueType(0), dl);
21122112

2113-
Lo = DAG.getNode(Opcode, dl, Lo.getValueType(),
2114-
{Lo, MaskLo, EVLLo}, Flags);
2115-
Hi = DAG.getNode(Opcode, dl, Hi.getValueType(),
2116-
{Hi, MaskHi, EVLHi}, Flags);
2113+
Lo = DAG.getNode(Opcode, dl, LoVT, {Lo, MaskLo, EVLLo}, Flags);
2114+
Hi = DAG.getNode(Opcode, dl, HiVT, {Hi, MaskHi, EVLHi}, Flags);
21172115
}
21182116

21192117
void DAGTypeLegalizer::SplitVecRes_ExtendOp(SDNode *N, SDValue &Lo,

0 commit comments

Comments
 (0)