Skip to content

Commit cb30a32

Browse files
authored
Simplify calculation of LaneElts in ExprConstant.cpp
1 parent dc67248 commit cb30a32

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clang/lib/AST/ExprConstant.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11630,9 +11630,7 @@ static bool evalPshufBuiltin(EvalInfo &Info, const CallExpr *Call,
1163011630
return false;
1163111631
unsigned NumElts = VT->getNumElements();
1163211632

11633-
unsigned TotalBits = NumElts * ElemBits;
11634-
unsigned LaneBits = (TotalBits == 64) ? 64u : 128u;
11635-
unsigned LaneElts = LaneBits / ElemBits;
11633+
unsigned LaneElts = 128u / ElemBits;
1163611634
if (!LaneElts || (NumElts % LaneElts) != 0)
1163711635
return false;
1163811636

0 commit comments

Comments
 (0)