I abandoned D124080. In SelectionDAG::getNode, use VP_XOR or VP_AND replace VP_ADD/VP_MUL/VP_SUB when operand type is mask.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This should be done in SelectionDAG::getNode not SelectionDAGBuilder so it happens any time a mask VP_ADD/VP_SUB/VP_MUL is created.
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | ||
---|---|---|
7586 | VP_MUL should be replaced with VP_AND. 0 * 0 -> 0 The same as the truth table for AND. |
Comment Actions
Address comments.
1.Move CheckVPMaskOp to SelectionDAG::getNode.
- use VP_AND replace VP_MUL
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | ||
---|---|---|
8835 ↗ | (On Diff #424405) | Why not make this part of the switch? You don't need the VTList. This function only receives one VT. |
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | ||
---|---|---|
8829 ↗ | (On Diff #424759) | I meant use the existing switch at line 8796. |
VP_MUL should be replaced with VP_AND.
0 * 0 -> 0
0 * 1 -> 0
1 * 0 -> 0
1 * 1 -> 1
The same as the truth table for AND.