Let other parts of legalization handle the rest of the node, this allows
re-use of existing optimizations elsewhere.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | ||
---|---|---|
4745 | I'm not sure we should use changeVectorElementType here. If SubVecVT is an MVT, changeVectorElementType will only work if NSubVT can also be represented as an MVT. I don't think that's guaranteed so EVT::getVectorVT(NOutV.getVectorElementType(), SubVecVT.getVectorElementCount()) would be better. | |
4749–4750 | This can be Vec = GetPromotedInteger(Vec) to get the already legalized value for that operand. |
Comment Actions
- Use GetPromotedInteger instead of manually extending
- Construct new EVT to avoid issues with EVT vs MVT.
Comment Actions
The code change looks good to me, but I don't know enough to review the test changes.
I'm not sure we should use changeVectorElementType here. If SubVecVT is an MVT, changeVectorElementType will only work if NSubVT can also be represented as an MVT. I don't think that's guaranteed so EVT::getVectorVT(NOutV.getVectorElementType(), SubVecVT.getVectorElementCount()) would be better.