Skip to content

Commit 7850912

Browse files
committed
address pr feedback
1 parent d72983f commit 7850912

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12356,7 +12356,7 @@ def err_builtin_invalid_arg_type: Error <
1235612356
"an unsigned integer|"
1235712357
"an 'int'|"
1235812358
"a vector of floating points|"
12359-
"a vector of integers or floating points}1 (was %2)">;
12359+
"a vector of arithmetic element type}1 (was %2)">;
1236012360

1236112361
def err_builtin_matrix_disabled: Error<
1236212362
"matrix types extension is disabled. Pass -fenable-matrix to enable it">;

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4283,7 +4283,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
42834283
if (E->getArg(0)->getType()->hasFloatingRepresentation()) {
42844284
Value *X = EmitScalarExpr(E->getArg(0));
42854285
auto EltTy = X->getType()->getScalarType();
4286-
Value *Seed = ConstantFP::get(EltTy, 0);
4286+
Value *Seed = ConstantFP::get(EltTy, -0.0);
42874287
return RValue::get(Builder.CreateIntrinsic(
42884288
/*ReturnType=*/EltTy, llvm::Intrinsic::vector_reduce_fadd,
42894289
ArrayRef<Value *>{Seed, X}, nullptr, "rdx.fadd"));
@@ -4296,7 +4296,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
42964296
if (E->getArg(0)->getType()->hasFloatingRepresentation()) {
42974297
Value *X = EmitScalarExpr(E->getArg(0));
42984298
auto EltTy = X->getType()->getScalarType();
4299-
Value *Seed = ConstantFP::get(EltTy, 0);
4299+
Value *Seed = ConstantFP::get(EltTy, 1.0);
43004300
return RValue::get(Builder.CreateIntrinsic(
43014301
/*ReturnType=*/EltTy, llvm::Intrinsic::vector_reduce_fmul,
43024302
ArrayRef<Value *>{Seed, X}, nullptr, "rdx.fmul"));

0 commit comments

Comments
 (0)