Skip to content

Commit 9b5857a

Browse files
authored
[X86] Fix parentheses for clarity in X86ISelLowering.cpp (#121954)
fixes #121908 This pull request resolves issue #121908 by adding proper parentheses in X86ISelLowering.cpp to follow operator precedence rules. This change ensures better code clarity and avoids ambiguity.
1 parent 1ac52ec commit 9b5857a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42431,7 +42431,7 @@ static SDValue combineTargetShuffle(SDValue N, const SDLoc &DL,
4243142431
// Canonicalize to VPERMV if both sources are the same.
4243242432
if (V1 == V2) {
4243342433
for (int &M : Mask)
42434-
M = (M < 0 ? M : M & Mask.size() - 1);
42434+
M = (M < 0 ? M : M & (Mask.size() - 1));
4243542435
SDValue NewMask = getConstVector(Mask, MaskVT, DAG, DL,
4243642436
/*IsMask=*/true);
4243742437
return DAG.getNode(X86ISD::VPERMV, DL, VT, NewMask, N.getOperand(0));

0 commit comments

Comments
 (0)