@@ -42365,10 +42365,10 @@ static SDValue combineTargetShuffle(SDValue N, const SDLoc &DL,
42365
42365
// If we're permuting the upper 256-bits subvectors of a concatenation, then
42366
42366
// see if we can peek through and access the subvector directly.
42367
42367
if (VT.is512BitVector()) {
42368
- // 512-bit mask uses 4 x i2 indices - if the msb is always set then only the
42369
- // upper subvector is used.
42370
- SDValue LHS = N->getOperand(0);
42371
- SDValue RHS = N->getOperand(1);
42368
+ // 512-bit mask uses 4 x i2 indices - if the msb is always set then only
42369
+ // the upper subvector is used.
42370
+ SDValue LHS = peekThroughBitcasts( N->getOperand(0) );
42371
+ SDValue RHS = peekThroughBitcasts( N->getOperand(1) );
42372
42372
uint64_t Mask = N->getConstantOperandVal(2);
42373
42373
SmallVector<SDValue> LHSOps, RHSOps;
42374
42374
SDValue NewLHS, NewRHS;
@@ -42383,8 +42383,9 @@ static SDValue combineTargetShuffle(SDValue N, const SDLoc &DL,
42383
42383
Mask &= ~0xA0;
42384
42384
}
42385
42385
if (NewLHS || NewRHS)
42386
- return DAG.getNode(X86ISD::SHUF128, DL, VT, NewLHS ? NewLHS : LHS,
42387
- NewRHS ? NewRHS : RHS,
42386
+ return DAG.getNode(X86ISD::SHUF128, DL, VT,
42387
+ DAG.getBitcast(VT, NewLHS ? NewLHS : LHS),
42388
+ DAG.getBitcast(VT, NewRHS ? NewRHS : RHS),
42388
42389
DAG.getTargetConstant(Mask, DL, MVT::i8));
42389
42390
}
42390
42391
return SDValue();
0 commit comments