Skip to content

Commit b206462

Browse files
committed
Format
1 parent 125542b commit b206462

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

clang/include/clang/Basic/BuiltinsX86.td

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,9 @@ let Features = "avx512bitalg", Attributes = [NoThrow, Const, RequiredVectorWidth
13571357
let Features = "avx512bw", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
13581358
def pavgb512 : X86Builtin<"_Vector<64, unsigned char>(_Vector<64, unsigned char>, _Vector<64, unsigned char>)">;
13591359
def pavgw512 : X86Builtin<"_Vector<32, unsigned short>(_Vector<32, unsigned short>, _Vector<32, unsigned short>)">;
1360-
def pmulhrsw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Vector<32, short>)">;
1360+
def pmulhrsw512
1361+
: X86Builtin<
1362+
"_Vector<32, short>(_Vector<32, short>, _Vector<32, short>)">;
13611363
def pmulhuw512 : X86Builtin<"_Vector<32, unsigned short>(_Vector<32, unsigned short>, _Vector<32, unsigned short>)">;
13621364
def pmulhw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Vector<32, short>)">;
13631365
}

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3428,13 +3428,13 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
34283428
case clang::X86::BI__builtin_ia32_pmulhrsw256:
34293429
case clang::X86::BI__builtin_ia32_pmulhrsw512:
34303430
return interp__builtin_elementwise_int_binop(
3431-
S, OpPC, Call, [](const APSInt &LHS, const APSInt &RHS) {
3432-
unsigned Width = LHS.getBitWidth();
3433-
APInt Mul = llvm::APIntOps::mulhs(LHS, RHS);
3434-
Mul = Mul.relativeLShr(14);
3435-
Mul = Mul + APInt(Width, 1, true);
3436-
return Mul.relativeLShr(1);
3437-
});
3431+
S, OpPC, Call, [](const APSInt &LHS, const APSInt &RHS) {
3432+
unsigned Width = LHS.getBitWidth();
3433+
APInt Mul = llvm::APIntOps::mulhs(LHS, RHS);
3434+
Mul = Mul.relativeLShr(14);
3435+
Mul = Mul + APInt(Width, 1, true);
3436+
return Mul.relativeLShr(1);
3437+
});
34383438

34393439
case clang::X86::BI__builtin_ia32_pavgb128:
34403440
case clang::X86::BI__builtin_ia32_pavgw128:

0 commit comments

Comments
 (0)