Skip to content

Commit 5d5e9cf

Browse files
author
iclsrc
committed
Merge from 'main' to 'sycl-web' (#1)
CONFLICT (content): Merge conflict in clang/include/clang/Basic/CodeGenOptions.def
2 parents 5d9754a + 0175999 commit 5d5e9cf

File tree

197 files changed

+1745
-1043
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+1745
-1043
lines changed

clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp

Lines changed: 65 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,19 @@ void SizeofExpressionCheck::registerMatchers(MatchFinder *Finder) {
8484
// positives if sizeof is applied on template argument.
8585

8686
const auto IntegerExpr = ignoringParenImpCasts(integerLiteral());
87-
const auto ConstantExpr = expr(ignoringParenImpCasts(
87+
const auto ConstantExpr = ignoringParenImpCasts(
8888
anyOf(integerLiteral(), unaryOperator(hasUnaryOperand(IntegerExpr)),
89-
binaryOperator(hasLHS(IntegerExpr), hasRHS(IntegerExpr)))));
90-
const auto IntegerCallExpr = expr(ignoringParenImpCasts(
89+
binaryOperator(hasLHS(IntegerExpr), hasRHS(IntegerExpr))));
90+
const auto IntegerCallExpr = ignoringParenImpCasts(
9191
callExpr(anyOf(hasType(isInteger()), hasType(enumType())),
92-
unless(isInTemplateInstantiation()))));
92+
unless(isInTemplateInstantiation())));
9393
const auto SizeOfExpr = expr(anyOf(
9494
sizeOfExpr(
9595
has(hasUnqualifiedDesugaredType(type().bind("sizeof-arg-type")))),
9696
sizeOfExpr(has(expr(hasType(
9797
hasUnqualifiedDesugaredType(type().bind("sizeof-arg-type"))))))));
98-
const auto SizeOfZero = expr(
99-
sizeOfExpr(has(ignoringParenImpCasts(expr(integerLiteral(equals(0)))))));
98+
const auto SizeOfZero =
99+
sizeOfExpr(has(ignoringParenImpCasts(integerLiteral(equals(0)))));
100100

101101
// Detect expression like: sizeof(ARRAYLEN);
102102
// Note: The expression 'sizeof(sizeof(0))' is a portable trick used to know
@@ -111,74 +111,69 @@ void SizeofExpressionCheck::registerMatchers(MatchFinder *Finder) {
111111

112112
// Detect sizeof(f())
113113
if (WarnOnSizeOfIntegerExpression) {
114-
Finder->addMatcher(
115-
expr(sizeOfExpr(ignoringParenImpCasts(has(IntegerCallExpr))))
116-
.bind("sizeof-integer-call"),
117-
this);
114+
Finder->addMatcher(sizeOfExpr(ignoringParenImpCasts(has(IntegerCallExpr)))
115+
.bind("sizeof-integer-call"),
116+
this);
118117
}
119118

120119
// Detect expression like: sizeof(this);
121120
if (WarnOnSizeOfThis) {
122-
Finder->addMatcher(
123-
expr(sizeOfExpr(has(ignoringParenImpCasts(expr(cxxThisExpr())))))
124-
.bind("sizeof-this"),
125-
this);
121+
Finder->addMatcher(sizeOfExpr(has(ignoringParenImpCasts(cxxThisExpr())))
122+
.bind("sizeof-this"),
123+
this);
126124
}
127125

128126
// Detect sizeof(kPtr) where kPtr is 'const char* kPtr = "abc"';
129127
const auto CharPtrType = pointerType(pointee(isAnyCharacter()));
130128
const auto ConstStrLiteralDecl =
131-
varDecl(isDefinition(), hasType(qualType(hasCanonicalType(CharPtrType))),
129+
varDecl(isDefinition(), hasType(hasCanonicalType(CharPtrType)),
132130
hasInitializer(ignoringParenImpCasts(stringLiteral())));
133-
Finder->addMatcher(expr(sizeOfExpr(has(ignoringParenImpCasts(expr(
134-
hasType(qualType(hasCanonicalType(CharPtrType))),
135-
ignoringParenImpCasts(declRefExpr(
136-
hasDeclaration(ConstStrLiteralDecl))))))))
137-
.bind("sizeof-charp"),
138-
this);
131+
Finder->addMatcher(
132+
sizeOfExpr(has(ignoringParenImpCasts(
133+
expr(hasType(hasCanonicalType(CharPtrType)),
134+
ignoringParenImpCasts(declRefExpr(
135+
hasDeclaration(ConstStrLiteralDecl)))))))
136+
.bind("sizeof-charp"),
137+
this);
139138

140139
// Detect sizeof(ptr) where ptr points to an aggregate (i.e. sizeof(&S)).
141140
// Do not find it if RHS of a 'sizeof(arr) / sizeof(arr[0])' expression.
142-
const auto ArrayExpr = expr(ignoringParenImpCasts(
143-
expr(hasType(qualType(hasCanonicalType(arrayType()))))));
141+
const auto ArrayExpr =
142+
ignoringParenImpCasts(hasType(hasCanonicalType(arrayType())));
144143
const auto ArrayCastExpr = expr(anyOf(
145144
unaryOperator(hasUnaryOperand(ArrayExpr), unless(hasOperatorName("*"))),
146145
binaryOperator(hasEitherOperand(ArrayExpr)),
147146
castExpr(hasSourceExpression(ArrayExpr))));
148-
const auto PointerToArrayExpr = expr(ignoringParenImpCasts(expr(
149-
hasType(qualType(hasCanonicalType(pointerType(pointee(arrayType()))))))));
150-
151-
const auto StructAddrOfExpr =
152-
unaryOperator(hasOperatorName("&"),
153-
hasUnaryOperand(ignoringParenImpCasts(expr(
154-
hasType(qualType(hasCanonicalType(recordType())))))));
155-
const auto PointerToStructType = type(hasUnqualifiedDesugaredType(
156-
pointerType(pointee(recordType()))));
157-
const auto PointerToStructExpr = expr(ignoringParenImpCasts(expr(
158-
hasType(qualType(hasCanonicalType(PointerToStructType))),
159-
unless(cxxThisExpr()))));
160-
161-
const auto ArrayOfPointersExpr = expr(ignoringParenImpCasts(expr(hasType(
162-
qualType(hasCanonicalType(arrayType(hasElementType(pointerType()))
163-
.bind("type-of-array-of-pointers")))))));
147+
const auto PointerToArrayExpr = ignoringParenImpCasts(
148+
hasType(hasCanonicalType(pointerType(pointee(arrayType())))));
149+
150+
const auto StructAddrOfExpr = unaryOperator(
151+
hasOperatorName("&"), hasUnaryOperand(ignoringParenImpCasts(
152+
hasType(hasCanonicalType(recordType())))));
153+
const auto PointerToStructType =
154+
hasUnqualifiedDesugaredType(pointerType(pointee(recordType())));
155+
const auto PointerToStructExpr = ignoringParenImpCasts(expr(
156+
hasType(hasCanonicalType(PointerToStructType)), unless(cxxThisExpr())));
157+
158+
const auto ArrayOfPointersExpr = ignoringParenImpCasts(
159+
hasType(hasCanonicalType(arrayType(hasElementType(pointerType()))
160+
.bind("type-of-array-of-pointers"))));
164161
const auto ArrayOfSamePointersExpr =
165-
expr(ignoringParenImpCasts(expr(hasType(qualType(hasCanonicalType(
166-
arrayType(equalsBoundNode("type-of-array-of-pointers"))))))));
167-
const auto ZeroLiteral =
168-
expr(ignoringParenImpCasts(integerLiteral(equals(0))));
162+
ignoringParenImpCasts(hasType(hasCanonicalType(
163+
arrayType(equalsBoundNode("type-of-array-of-pointers")))));
164+
const auto ZeroLiteral = ignoringParenImpCasts(integerLiteral(equals(0)));
169165
const auto ArrayOfSamePointersZeroSubscriptExpr =
170-
expr(ignoringParenImpCasts(arraySubscriptExpr(
171-
hasBase(ArrayOfSamePointersExpr), hasIndex(ZeroLiteral))));
166+
ignoringParenImpCasts(arraySubscriptExpr(hasBase(ArrayOfSamePointersExpr),
167+
hasIndex(ZeroLiteral)));
172168
const auto ArrayLengthExprDenom =
173-
expr(hasParent(expr(ignoringParenImpCasts(
174-
binaryOperator(hasOperatorName("/"),
175-
hasLHS(expr(ignoringParenImpCasts(expr(
176-
sizeOfExpr(has(ArrayOfPointersExpr)))))))))),
169+
expr(hasParent(expr(ignoringParenImpCasts(binaryOperator(
170+
hasOperatorName("/"), hasLHS(ignoringParenImpCasts(sizeOfExpr(
171+
has(ArrayOfPointersExpr)))))))),
177172
sizeOfExpr(has(ArrayOfSamePointersZeroSubscriptExpr)));
178173

179-
Finder->addMatcher(expr(anyOf(sizeOfExpr(has(expr(ignoringParenImpCasts(anyOf(
174+
Finder->addMatcher(expr(anyOf(sizeOfExpr(has(ignoringParenImpCasts(anyOf(
180175
ArrayCastExpr, PointerToArrayExpr,
181-
StructAddrOfExpr, PointerToStructExpr))))),
176+
StructAddrOfExpr, PointerToStructExpr)))),
182177
sizeOfExpr(has(PointerToStructType))),
183178
unless(ArrayLengthExprDenom))
184179
.bind("sizeof-pointer-to-aggregate"),
@@ -197,8 +192,8 @@ void SizeofExpressionCheck::registerMatchers(MatchFinder *Finder) {
197192
}
198193

199194
// Detect expression like: sizeof(expr, expr); most likely an error.
200-
Finder->addMatcher(expr(sizeOfExpr(has(expr(ignoringParenImpCasts(
201-
binaryOperator(hasOperatorName(",")))))))
195+
Finder->addMatcher(sizeOfExpr(has(ignoringParenImpCasts(
196+
binaryOperator(hasOperatorName(",")))))
202197
.bind("sizeof-comma-expr"),
203198
this);
204199

@@ -212,9 +207,9 @@ void SizeofExpressionCheck::registerMatchers(MatchFinder *Finder) {
212207
const auto ElemType =
213208
arrayType(hasElementType(recordType().bind("elem-type")));
214209
const auto ElemPtrType = pointerType(pointee(type().bind("elem-ptr-type")));
215-
const auto NumType = qualType(hasCanonicalType(
216-
type(anyOf(ElemType, ElemPtrType, type())).bind("num-type")));
217-
const auto DenomType = qualType(hasCanonicalType(type().bind("denom-type")));
210+
const auto NumType = hasCanonicalType(
211+
type(anyOf(ElemType, ElemPtrType, type())).bind("num-type"));
212+
const auto DenomType = hasCanonicalType(type().bind("denom-type"));
218213

219214
Finder->addMatcher(
220215
binaryOperator(hasOperatorName("/"),
@@ -246,30 +241,29 @@ void SizeofExpressionCheck::registerMatchers(MatchFinder *Finder) {
246241

247242
// Detect strange double-sizeof expression like: sizeof(sizeof(...));
248243
// Note: The expression 'sizeof(sizeof(0))' is accepted.
249-
Finder->addMatcher(
250-
expr(sizeOfExpr(has(ignoringParenImpCasts(expr(
251-
hasSizeOfDescendant(8, expr(SizeOfExpr, unless(SizeOfZero))))))))
252-
.bind("sizeof-sizeof-expr"),
253-
this);
244+
Finder->addMatcher(sizeOfExpr(has(ignoringParenImpCasts(hasSizeOfDescendant(
245+
8, allOf(SizeOfExpr, unless(SizeOfZero))))))
246+
.bind("sizeof-sizeof-expr"),
247+
this);
254248

255249
// Detect sizeof in pointer arithmetic like: N * sizeof(S) == P1 - P2 or
256250
// (P1 - P2) / sizeof(S) where P1 and P2 are pointers to type S.
257251
const auto PtrDiffExpr = binaryOperator(
258252
hasOperatorName("-"),
259-
hasLHS(expr(hasType(hasUnqualifiedDesugaredType(pointerType(pointee(
260-
hasUnqualifiedDesugaredType(type().bind("left-ptr-type")))))))),
261-
hasRHS(expr(hasType(hasUnqualifiedDesugaredType(pointerType(pointee(
262-
hasUnqualifiedDesugaredType(type().bind("right-ptr-type")))))))));
253+
hasLHS(hasType(hasUnqualifiedDesugaredType(pointerType(pointee(
254+
hasUnqualifiedDesugaredType(type().bind("left-ptr-type"))))))),
255+
hasRHS(hasType(hasUnqualifiedDesugaredType(pointerType(pointee(
256+
hasUnqualifiedDesugaredType(type().bind("right-ptr-type"))))))));
263257

264258
Finder->addMatcher(
265259
binaryOperator(
266260
hasAnyOperatorName("==", "!=", "<", "<=", ">", ">=", "+", "-"),
267-
hasOperands(expr(anyOf(ignoringParenImpCasts(SizeOfExpr),
268-
ignoringParenImpCasts(binaryOperator(
269-
hasOperatorName("*"),
270-
hasEitherOperand(
271-
ignoringParenImpCasts(SizeOfExpr)))))),
272-
ignoringParenImpCasts(PtrDiffExpr)))
261+
hasOperands(
262+
anyOf(ignoringParenImpCasts(SizeOfExpr),
263+
ignoringParenImpCasts(binaryOperator(
264+
hasOperatorName("*"),
265+
hasEitherOperand(ignoringParenImpCasts(SizeOfExpr))))),
266+
ignoringParenImpCasts(PtrDiffExpr)))
273267
.bind("sizeof-in-ptr-arithmetic-mul"),
274268
this);
275269

clang/include/clang/Basic/BuiltinsPPC.def

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,12 @@ BUILTIN(__builtin_truncf128_round_to_odd, "dLLd", "")
600600
BUILTIN(__builtin_vsx_scalar_extract_expq, "ULLiLLd", "")
601601
BUILTIN(__builtin_vsx_scalar_insert_exp_qp, "LLdLLdULLi", "")
602602

603+
// Fastmath by default builtins
604+
BUILTIN(__builtin_ppc_rsqrtf, "V4fV4f", "")
605+
BUILTIN(__builtin_ppc_rsqrtd, "V2dV2d", "")
606+
BUILTIN(__builtin_ppc_recipdivf, "V4fV4fV4f", "")
607+
BUILTIN(__builtin_ppc_recipdivd, "V2dV2dV2d", "")
608+
603609
// HTM builtins
604610
BUILTIN(__builtin_tbegin, "UiUIi", "")
605611
BUILTIN(__builtin_tend, "UiUIi", "")

clang/include/clang/Basic/CodeGenOptions.def

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,15 @@ CODEGENOPT(PassByValueIsNoAlias, 1, 0)
426426
/// according to the field declaring type width.
427427
CODEGENOPT(AAPCSBitfieldWidth, 1, 1)
428428

429+
<<<<<<< HEAD
429430
// Whether to instrument SPIR device code with ITT annotations
430431
CODEGENOPT(SPIRITTAnnotations, 1, 0)
432+
=======
433+
/// Sets the IEEE bit in the expected default floating point mode register.
434+
/// Floating point opcodes that support exception flag gathering quiet and
435+
/// propagate signaling NaN inputs per IEEE 754-2008 (AMDGPU Only)
436+
CODEGENOPT(EmitIEEENaNCompliantInsts, 1, 1)
437+
>>>>>>> 0175999805cf05d91c8a127ebd8c9d54a640abe9
431438

432439
#undef CODEGENOPT
433440
#undef ENUM_CODEGENOPT

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ def warn_drv_mismatch_fpga_archive : Warning<
144144
def err_drv_unsupported_opt_dpcpp : Error<"option '%0' unsupported with DPC++">;
145145
def err_drv_argument_only_allowed_with : Error<
146146
"invalid argument '%0' only allowed with '%1'">;
147+
def err_drv_amdgpu_ieee_without_no_honor_nans : Error<
148+
"invalid argument '-mno-amdgpu-ieee' only allowed with relaxed NaN handling">;
147149
def err_drv_argument_not_allowed_with : Error<
148150
"invalid argument '%0' not allowed with '%1'">;
149151
def err_drv_invalid_version_number : Error<

clang/include/clang/Driver/Options.td

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3261,6 +3261,14 @@ def mexec_model_EQ : Joined<["-"], "mexec-model=">, Group<m_wasm_Features_Driver
32613261
Values<"command,reactor">,
32623262
HelpText<"Execution model (WebAssembly only)">;
32633263

3264+
defm amdgpu_ieee : BoolOption<"m", "amdgpu-ieee",
3265+
CodeGenOpts<"EmitIEEENaNCompliantInsts">, DefaultTrue,
3266+
PosFlag<SetTrue, [], "Sets the IEEE bit in the expected default floating point "
3267+
" mode register. Floating point opcodes that support exception flag "
3268+
"gathering quiet and propagate signaling NaN inputs per IEEE 754-2008. "
3269+
"This option changes the ABI. (AMDGPU only)">,
3270+
NegFlag<SetFalse, [CC1Option]>>, Group<m_Group>;
3271+
32643272
def mcode_object_version_EQ : Joined<["-"], "mcode-object-version=">, Group<m_Group>,
32653273
HelpText<"Specify code object ABI version. Defaults to 3. (AMDGPU only)">,
32663274
MetaVarName<"<version>">, Values<"2,3,4">;

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15119,6 +15119,25 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID,
1511915119
return Builder.CreateCall(F, X);
1512015120
}
1512115121

15122+
// Fastmath by default
15123+
case PPC::BI__builtin_ppc_recipdivf:
15124+
case PPC::BI__builtin_ppc_recipdivd:
15125+
case PPC::BI__builtin_ppc_rsqrtf:
15126+
case PPC::BI__builtin_ppc_rsqrtd: {
15127+
Builder.getFastMathFlags().setFast();
15128+
llvm::Type *ResultType = ConvertType(E->getType());
15129+
Value *X = EmitScalarExpr(E->getArg(0));
15130+
15131+
if (BuiltinID == PPC::BI__builtin_ppc_recipdivf ||
15132+
BuiltinID == PPC::BI__builtin_ppc_recipdivd) {
15133+
Value *Y = EmitScalarExpr(E->getArg(1));
15134+
return Builder.CreateFDiv(X, Y, "recipdiv");
15135+
}
15136+
auto *One = ConstantFP::get(ResultType, 1.0);
15137+
llvm::Function *F = CGM.getIntrinsic(Intrinsic::sqrt, ResultType);
15138+
return Builder.CreateFDiv(One, Builder.CreateCall(F, X), "rsqrt");
15139+
}
15140+
1512215141
// FMA variations
1512315142
case PPC::BI__builtin_vsx_xvmaddadp:
1512415143
case PPC::BI__builtin_vsx_xvmaddasp:

clang/lib/CodeGen/TargetInfo.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9172,6 +9172,9 @@ void AMDGPUTargetCodeGenInfo::setTargetAttributes(
91729172

91739173
if (M.getContext().getTargetInfo().allowAMDGPUUnsafeFPAtomics())
91749174
F->addFnAttr("amdgpu-unsafe-fp-atomics", "true");
9175+
9176+
if (!getABIInfo().getCodeGenOpts().EmitIEEENaNCompliantInsts)
9177+
F->addFnAttr("amdgpu-ieee", "false");
91759178
}
91769179

91779180
unsigned AMDGPUTargetCodeGenInfo::getOpenCLKernelCallingConv() const {

clang/lib/Driver/ToolChains/Darwin.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2671,8 +2671,16 @@ void Darwin::addPlatformVersionArgs(const llvm::opt::ArgList &Args,
26712671
VersionTuple SDKVersion = SDKInfo->getVersion().withoutBuild();
26722672
CmdArgs.push_back(Args.MakeArgString(SDKVersion.getAsString()));
26732673
} else {
2674-
// Use a blank SDK version if it's not present.
2675-
CmdArgs.push_back("0.0.0");
2674+
// Use an SDK version that's matching the deployment target if the SDK
2675+
// version is missing. This is preferred over an empty SDK version (0.0.0)
2676+
// as the system's runtime might expect the linked binary to contain a
2677+
// valid SDK version in order for the binary to work correctly. It's
2678+
// reasonable to use the deployment target version as a proxy for the
2679+
// SDK version because older SDKs don't guarantee support for deployment
2680+
// targets newer than the SDK versions, so that rules out using some
2681+
// predetermined older SDK version, which leaves the deployment target
2682+
// version as the only reasonable choice.
2683+
CmdArgs.push_back(Args.MakeArgString(TargetVersion.getAsString()));
26762684
}
26772685
}
26782686

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,6 +1950,11 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args,
19501950
else if (Args.hasArg(options::OPT_fno_finite_loops))
19511951
Opts.FiniteLoops = CodeGenOptions::FiniteLoopsKind::Never;
19521952

1953+
Opts.EmitIEEENaNCompliantInsts =
1954+
Args.hasFlag(options::OPT_mamdgpu_ieee, options::OPT_mno_amdgpu_ieee);
1955+
if (!Opts.EmitIEEENaNCompliantInsts && !LangOptsRef.NoHonorNaNs)
1956+
Diags.Report(diag::err_drv_amdgpu_ieee_without_no_honor_nans);
1957+
19531958
return Diags.getNumErrors() == NumErrorsBefore;
19541959
}
19551960

clang/lib/Headers/altivec.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8359,6 +8359,16 @@ static __inline__ vector double __ATTRS_o_ai vec_rsqrte(vector double __a) {
83598359
}
83608360
#endif
83618361

8362+
static vector float __ATTRS_o_ai vec_rsqrt(vector float __a) {
8363+
return __builtin_ppc_rsqrtf(__a);
8364+
}
8365+
8366+
#ifdef __VSX__
8367+
static vector double __ATTRS_o_ai vec_rsqrt(vector double __a) {
8368+
return __builtin_ppc_rsqrtd(__a);
8369+
}
8370+
#endif
8371+
83628372
/* vec_vrsqrtefp */
83638373

83648374
static __inline__ __vector float __attribute__((__always_inline__))
@@ -9081,6 +9091,11 @@ static __inline__ vector unsigned int __ATTRS_o_ai vec_sldw(
90819091
return vec_sld(__a, __b, ((__c << 2) & 0x0F));
90829092
}
90839093

9094+
static __inline__ vector float __ATTRS_o_ai vec_sldw(
9095+
vector float __a, vector float __b, unsigned const int __c) {
9096+
return vec_sld(__a, __b, ((__c << 2) & 0x0F));
9097+
}
9098+
90849099
#ifdef __VSX__
90859100
static __inline__ vector signed long long __ATTRS_o_ai
90869101
vec_sldw(vector signed long long __a, vector signed long long __b,
@@ -9093,6 +9108,11 @@ vec_sldw(vector unsigned long long __a, vector unsigned long long __b,
90939108
unsigned const int __c) {
90949109
return vec_sld(__a, __b, ((__c << 2) & 0x0F));
90959110
}
9111+
9112+
static __inline__ vector double __ATTRS_o_ai vec_sldw(
9113+
vector double __a, vector double __b, unsigned const int __c) {
9114+
return vec_sld(__a, __b, ((__c << 2) & 0x0F));
9115+
}
90969116
#endif
90979117

90989118
#ifdef __POWER9_VECTOR__
@@ -17897,6 +17917,18 @@ static vector signed char __ATTRS_o_ai vec_nabs(vector signed char __a) {
1789717917
return __builtin_altivec_vminsb(__a, -__a);
1789817918
}
1789917919

17920+
static vector float __ATTRS_o_ai vec_recipdiv(vector float __a,
17921+
vector float __b) {
17922+
return __builtin_ppc_recipdivf(__a, __b);
17923+
}
17924+
17925+
#ifdef __VSX__
17926+
static vector double __ATTRS_o_ai vec_recipdiv(vector double __a,
17927+
vector double __b) {
17928+
return __builtin_ppc_recipdivd(__a, __b);
17929+
}
17930+
#endif
17931+
1790017932
#ifdef __POWER10_VECTOR__
1790117933

1790217934
/* vec_extractm */

0 commit comments

Comments
 (0)