Skip to content

Commit 4701afa

Browse files
committed
[X86] combineX86ShufflesRecursively - merge loops peeking through shuffle operands. NFC.
Merge loops to peek through free insert_subvector / bitcasts / extract_subvector. To keep this NFC I haven't reordered the peek throughs - this will done in a future patch to help with #133947 regressions
1 parent fbc8335 commit 4701afa

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -41115,9 +41115,9 @@ static SDValue combineX86ShufflesRecursively(
4111541115
}
4111641116
}
4111741117

41118-
// Peek through vector widenings and set out of bounds mask indices to undef.
41119-
// TODO: Can resolveTargetShuffleInputsAndMask do some of this?
4112041118
for (auto [I, Op] : enumerate(Ops)) {
41119+
// Peek through vector widenings + set out of bounds mask indices to undef.
41120+
// TODO: Can resolveTargetShuffleInputsAndMask do some of this?
4112141121
if (Op.getOpcode() == ISD::INSERT_SUBVECTOR && Op.getOperand(0).isUndef() &&
4112241122
isNullConstant(Op.getOperand(2))) {
4112341123
Op = Op.getOperand(1);
@@ -41130,10 +41130,8 @@ static SDValue combineX86ShufflesRecursively(
4113041130
M = SM_SentinelUndef;
4113141131
}
4113241132
}
41133-
}
4113441133

41135-
// Peek through any free bitcasts/extract_subvector nodes back to root size.
41136-
for (SDValue &Op : Ops){
41134+
// Peek through any free bitcasts/extract_subvector nodes back to root size.
4113741135
SDValue BC = Op;
4113841136
if (BC.getOpcode() == ISD::BITCAST && BC.hasOneUse())
4113941137
BC = peekThroughOneUseBitcasts(BC);

0 commit comments

Comments
 (0)