I had falsely assumed that constant operands would be operand(1) of the bin ops that may need their constant operand to be masked.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
3924 ↗ | (On Diff #128420) | It might be clearer if you just do something like: SDValue Op0 = LogicN->getOperand(0); SDValue Op1 = LogicN->getOperand(1); if (isa<ConstantSDNode>(Op0)) std::swap(Op0, Op1); SDValue And = DAG.getNode(ISD::AND, SDLoc(Op1), Op1.getValueType(), Op1, MaskOp); DAG.UpdateNodeOperands(LogicN, Op0, And); |
test/CodeGen/X86/pr35761.ll | ||
66 ↗ | (On Diff #128420) | Please can you try to reduce this further |