Add widen and split support for VP_TRUNCATE.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | ||
---|---|---|
3419 | I don't follow this comment, I'm afraid. Is it saying that other targets may need special target-specific handling in SplitVeOp_UnaryOp for VP_TRUNCATE? I'd prefer to avoid mentioning targets in SelectionDAG if it can be helped - this is meant to be target-agnostic code. | |
4234 | Maybe an assert like ISD::isVPOpcode? here? |
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | ||
---|---|---|
3419 | What I meant is now only implement SplitVeOp_UnaryOp for VP_TRUNCATE. In this SplitVecOp_TruncateHelper method , I cann't write a RISCV test trigger the code from line 3425 to end, so I do nothing in this part of code.Maybe other Targets should do special handle VP_TRUNCATE in this part of code. | |
4234 | You right. Add an assert to confirm it's VPOpcode. |
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | ||
---|---|---|
2912 | Check the operand count instead of the opcode? Then assert isVPOpcode like the widening code. |
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | ||
---|---|---|
2912 | I agree with you. Then there is more general. |
Check the operand count instead of the opcode? Then assert isVPOpcode like the widening code.