// Nuke no-op shuffles that show up after combining.
if (isNoopShuffleMask(Mask))
- return DCI.CombineTo(N.getNode(), N.getOperand(0), /*AddTo*/ true);
+ return N.getOperand(0);
// Look for simplifications involving one or two shuffle instructions.
SDValue V = N.getOperand(0);
// a particular chain.
if (SDValue Res = combineX86ShufflesRecursively(
{Op}, 0, Op, {0}, {}, /*Depth*/ 1,
- /*HasVarMask*/ false, DAG, Subtarget)) {
- return DCI.CombineTo(N, Res);
- }
+ /*HasVarMask*/ false, DAG, Subtarget))
+ return Res;
}
return SDValue();
SDValue Op(N, 0);
if (SDValue Res =
combineX86ShufflesRecursively({Op}, 0, Op, {0}, {}, /*Depth*/ 1,
- /*HasVarMask*/ false, DAG, Subtarget)) {
- return DCI.CombineTo(N, Res);
- }
+ /*HasVarMask*/ false, DAG, Subtarget))
+ return Res;
return SDValue();
}
SDValue Op(N, 0);
if (SDValue Res = combineX86ShufflesRecursively(
{Op}, 0, Op, {0}, {}, /*Depth*/ 1,
- /*HasVarMask*/ false, DAG, Subtarget)) {
- return DCI.CombineTo(N, Res);
- }
+ /*HasVarMask*/ false, DAG, Subtarget))
+ return Res;
}
// Constant Folding.
SDValue Op(N, 0);
if (SDValue Res =
combineX86ShufflesRecursively({Op}, 0, Op, {0}, {}, /*Depth*/ 1,
- /*HasVarMask*/ false, DAG, Subtarget)) {
- return DCI.CombineTo(N, Res);
- }
+ /*HasVarMask*/ false, DAG, Subtarget))
+ return Res;
return SDValue();
}
SDValue Op(N, 0);
if (SDValue Res = combineX86ShufflesRecursively(
{Op}, 0, Op, {0}, {}, /*Depth*/ 1,
- /*HasVarMask*/ false, DAG, Subtarget)) {
- return DCI.CombineTo(N, Res);
- }
+ /*HasVarMask*/ false, DAG, Subtarget))
+ return Res;
}
// Attempt to combine a scalar bitmask AND with an extracted shuffle.
SDValue Op(N, 0);
if (SDValue Res = combineX86ShufflesRecursively(
{Op}, 0, Op, {0}, {}, /*Depth*/ 1,
- /*HasVarMask*/ false, DAG, Subtarget)) {
- return DCI.CombineTo(N, Res);
- }
+ /*HasVarMask*/ false, DAG, Subtarget))
+ return Res;
}
return SDValue();