Skip to content

Commit b375f28

Browse files
committed
[X86][AVX] lowerShuffleAsLanePermuteAndSHUFP - only set the demanded elements of the lane mask.
Fixes an cyclic dependency issue with an upcoming patch where getVectorShuffle canonicalizes masks with splat build vector sources.
1 parent 60cc095 commit b375f28

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14907,8 +14907,7 @@ static SDValue lowerShuffleAsLanePermuteAndSHUFP(const SDLoc &DL, MVT VT,
1490714907
continue;
1490814908
int LaneBase = i & ~1;
1490914909
auto &LaneMask = (i & 1) ? RHSMask : LHSMask;
14910-
LaneMask[LaneBase + 0] = (M & ~1);
14911-
LaneMask[LaneBase + 1] = (M & ~1) + 1;
14910+
LaneMask[LaneBase + (M & 1)] = M;
1491214911
SHUFPMask |= (M & 1) << i;
1491314912
}
1491414913

0 commit comments

Comments
 (0)