Skip to content

Commit 412712f

Browse files
committed
Fix capitalization of local variables
1 parent b8311d2 commit 412712f

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3429,12 +3429,12 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
34293429
case clang::X86::BI__builtin_ia32_pmulhrsw512:
34303430
return interp__builtin_elementwise_int_binop(
34313431
S, OpPC, Call, [](const APSInt &LHS, const APSInt &RHS) {
3432-
unsigned width = LHS.getBitWidth();
3432+
unsigned Width = LHS.getBitWidth();
34333433

3434-
APInt mul = llvm::APIntOps::mulhs(LHS, RHS);
3435-
mul = mul.relativeLShr(14);
3436-
mul = mul.sadd_sat(APInt(width, 1, true));
3437-
return APInt(mul.relativeLShr(1));
3434+
APInt Mul = llvm::APIntOps::mulhs(LHS, RHS);
3435+
Mul = Mul.relativeLShr(14);
3436+
Mul = Mul.sadd_sat(APInt(Width, 1, true));
3437+
return APInt(Mul.relativeLShr(1));
34383438
});
34393439

34403440
case clang::X86::BI__builtin_ia32_pavgb128:

clang/lib/AST/ExprConstant.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11729,13 +11729,12 @@ bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) {
1172911729
case clang::X86::BI__builtin_ia32_pmulhrsw128:
1173011730
case clang::X86::BI__builtin_ia32_pmulhrsw256:
1173111731
case clang::X86::BI__builtin_ia32_pmulhrsw512:
11732-
return EvaluateBinOpExpr([](const APSInt &LHs, const APSInt& RHS) -> {
11733-
QualType DestEltTy = E->getType()->castAs<VectorType>()->getElementType();
11734-
unsigned width = Info.Ctx.getIntWidth(DestEltTy);
11735-
APInt mul = llvm::APIntOps::mulhs(LHS, RHS);
11736-
mul = mul.relativeLShr(14);
11737-
mul = mul.sadd_sat(APInt(width, 1, true));
11738-
return APInt(mul.relativeLShr(1));
11732+
return EvaluateBinOpExpr([](const APSInt &LHS, const APSInt& RHS) {
11733+
unsigned Width = LHS.getBitWidth();
11734+
APInt Mul = llvm::APIntOps::mulhs(LHS, RHS);
11735+
Mul = Mul.relativeLShr(14);
11736+
Mul = Mul.sadd_sat(APInt(Width, 1, true));
11737+
return APInt(Mul.relativeLShr(1));
1173911738
});
1174011739

1174111740
case clang::X86::BI__builtin_ia32_pmulhuw128:

0 commit comments

Comments
 (0)