Skip to content

Commit 0eb7195

Browse files
committed
[X86] LowerMUL/LowerRotate - avoid undefs in shuffle mask to prevent premature optimization
Later SimplifyDemandedVectorElts calls will simplify any remaining shuffles though the X86ISD::PMULUDQ node. Avoids regression in #123596
1 parent 5183ec4 commit 0eb7195

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29215,7 +29215,7 @@ static SDValue LowerMUL(SDValue Op, const X86Subtarget &Subtarget,
2921529215
"Should not custom lower when pmulld is available!");
2921629216

2921729217
// Extract the odd parts.
29218-
static const int UnpackMask[] = { 1, -1, 3, -1 };
29218+
static const int UnpackMask[] = {1, 1, 3, 3};
2921929219
SDValue Aodds = DAG.getVectorShuffle(VT, dl, A, A, UnpackMask);
2922029220
SDValue Bodds = DAG.getVectorShuffle(VT, dl, B, B, UnpackMask);
2922129221

@@ -31253,7 +31253,7 @@ static SDValue LowerRotate(SDValue Op, const X86Subtarget &Subtarget,
3125331253
// to v2i64 results at a time. The upper 32-bits contain the wrapped bits
3125431254
// that can then be OR'd with the lower 32-bits.
3125531255
assert(VT == MVT::v4i32 && "Only v4i32 vector rotate expected");
31256-
static const int OddMask[] = {1, -1, 3, -1};
31256+
static const int OddMask[] = {1, 1, 3, 3};
3125731257
SDValue R13 = DAG.getVectorShuffle(VT, DL, R, R, OddMask);
3125831258
SDValue Scale13 = DAG.getVectorShuffle(VT, DL, Scale, Scale, OddMask);
3125931259

0 commit comments

Comments
 (0)