Skip to content

Commit e953623

Browse files
authored
[X86] combineX86ShuffleChainWithExtract - ensure subvector widening is at index 0 (#143009)
When peeking through insert_subvector(undef,sub,c) widening patterns we didn't ensure c == 0 Fixes #142995
1 parent af54790 commit e953623

File tree

3 files changed

+296
-201
lines changed

3 files changed

+296
-201
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40663,7 +40663,8 @@ static SDValue combineX86ShuffleChainWithExtract(
4066340663
continue;
4066440664
}
4066540665
if (Input.getOpcode() == ISD::INSERT_SUBVECTOR &&
40666-
Input.getOperand(0).isUndef()) {
40666+
Input.getOperand(0).isUndef() &&
40667+
isNullConstant(Input.getOperand(2))) {
4066740668
Input = peekThroughBitcasts(Input.getOperand(1));
4066840669
continue;
4066940670
}

0 commit comments

Comments
 (0)