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
Event Timeline
lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
3924 | 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 | ||
67 | Please can you try to reduce this further |
It might be clearer if you just do something like: