Skip to content

Commit a89cda0

Browse files
committed
Ensure a widening insert is the entire upper half of subvectors
1 parent ae1bb7c commit a89cda0

File tree

2 files changed

+94
-95
lines changed

2 files changed

+94
-95
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42621,7 +42621,8 @@ static SDValue combineTargetShuffle(SDValue N, const SDLoc &DL,
4262142621
assert((SubOps.size() == 2 || SubOps.size() == 4) &&
4262242622
"Unexpected split ops");
4262342623
// Bail if we were permuting a widened vector.
42624-
if (SubOps[SubOps.size() - 1].isUndef())
42624+
if ((SubOps.size() == 2 && SubOps[1].isUndef()) ||
42625+
(SubOps.size() == 4 && SubOps[2].isUndef() && SubOps[3].isUndef()))
4262542626
return SDValue();
4262642627
// Bail if any subops would have folded into the concat.
4262742628
if (any_of(SubOps, [](SDValue Op) { return isShuffleFoldableLoad(Op); }))

0 commit comments

Comments
 (0)