Skip to content

Commit e6f4ee4

Browse files
committed
Merge commit '7f2e937469a8cec3fe977bf41ad2dfb9b4ce648a' into llvmspirv_pulldown
2 parents f428f71 + 7f2e937 commit e6f4ee4

File tree

83 files changed

+1836
-863
lines changed

Some content is hidden

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

83 files changed

+1836
-863
lines changed

bolt/lib/Passes/VeneerElimination.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ Error VeneerElimination::runOnFunctions(BinaryContext &BC) {
7373
continue;
7474

7575
const MCSymbol *TargetSymbol = BC.MIB->getTargetSymbol(Instr, 0);
76-
if (VeneerDestinations.find(TargetSymbol) == VeneerDestinations.end())
76+
auto It = VeneerDestinations.find(TargetSymbol);
77+
if (It == VeneerDestinations.end())
7778
continue;
7879

7980
VeneerCallers++;
80-
BC.MIB->replaceBranchTarget(Instr, VeneerDestinations[TargetSymbol],
81-
BC.Ctx.get());
81+
BC.MIB->replaceBranchTarget(Instr, It->second, BC.Ctx.get());
8282
}
8383
}
8484
}

clang-tools-extra/clangd/test/log.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: env CLANGD_FLAGS=-compile-commands-dir=no-such-dir not clangd -lit-test </dev/null 2>&1 >/dev/null | FileCheck %s
22
CHECK: I[{{.*}}]{{.*}} clangd version {{.*}}
33
CHECK: Working directory: {{.*}}
4-
CHECK: argv[0]: clangd
4+
CHECK: argv[0]: {{.*}}clangd
55
CHECK: argv[1]: -lit-test
66
CHECK: CLANGD_FLAGS: -compile-commands-dir=no-such-dir
77
CHECK: E[{{.*}}] Path specified by --compile-commands-dir does not exist.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// RUN: not clang-query --invalid-arg 2>&1 | FileCheck %s
22

3-
// CHECK: error: clang-query{{(\.exe)?}}: Unknown command line argument '--invalid-arg'. Try: 'clang-query{{(\.exe)?}} --help'
3+
// CHECK: error: clang-query{{(\.exe)?}}: Unknown command line argument '--invalid-arg'. Try: '{{.*}}clang-query{{(\.exe)?}} --help'
44
// CHECK-NEXT: clang-query{{(\.exe)?}}: Did you mean '--extra-arg'?
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// RUN: not clang-tidy --invalid-arg 2>&1 | FileCheck %s
22

3-
// CHECK: error: clang-tidy{{(\.exe)?}}: Unknown command line argument '--invalid-arg'. Try: 'clang-tidy{{(\.exe)?}} --help'
3+
// CHECK: error: clang-tidy{{(\.exe)?}}: Unknown command line argument '--invalid-arg'. Try: '{{.*}}clang-tidy{{(\.exe)?}} --help'
44
// CHECK-NEXT: clang-tidy{{(\.exe)?}}: Did you mean '--extra-arg'?

clang/include/clang-c/Index.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2980,7 +2980,7 @@ enum CXTypeKind {
29802980
CXType_Atomic = 177,
29812981
CXType_BTFTagAttributed = 178,
29822982

2983-
// HLSL Types
2983+
/* HLSL Types */
29842984
CXType_HLSLResource = 179,
29852985
CXType_HLSLAttributedResource = 180,
29862986

clang/lib/Sema/SemaHLSL.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,10 @@ static ResourceClass getResourceClass(RegisterType RT) {
102102
return ResourceClass::Sampler;
103103
case RegisterType::C:
104104
case RegisterType::I:
105-
llvm_unreachable("unexpected RegisterType value");
105+
// Deliberately falling through to the unreachable below.
106+
break;
106107
}
108+
llvm_unreachable("unexpected RegisterType value");
107109
}
108110

109111
DeclBindingInfo *ResourceBindings::addDeclBindingInfo(const VarDecl *VD,

clang/lib/Sema/SemaRISCV.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct RVVIntrinsicDef {
5050

5151
struct RVVOverloadIntrinsicDef {
5252
// Indexes of RISCVIntrinsicManagerImpl::IntrinsicList.
53-
SmallVector<uint16_t, 8> Indexes;
53+
SmallVector<uint32_t, 8> Indexes;
5454
};
5555

5656
} // namespace
@@ -169,7 +169,7 @@ class RISCVIntrinsicManagerImpl : public sema::RISCVIntrinsicManager {
169169
// List of all RVV intrinsic.
170170
std::vector<RVVIntrinsicDef> IntrinsicList;
171171
// Mapping function name to index of IntrinsicList.
172-
StringMap<uint16_t> Intrinsics;
172+
StringMap<uint32_t> Intrinsics;
173173
// Mapping function name to RVVOverloadIntrinsicDef.
174174
StringMap<RVVOverloadIntrinsicDef> OverloadIntrinsics;
175175

@@ -399,7 +399,7 @@ void RISCVIntrinsicManagerImpl::InitRVVIntrinsic(
399399
Record.HasFRMRoundModeOp);
400400

401401
// Put into IntrinsicList.
402-
uint16_t Index = IntrinsicList.size();
402+
uint32_t Index = IntrinsicList.size();
403403
assert(IntrinsicList.size() == (size_t)Index &&
404404
"Intrinsics indices overflow.");
405405
IntrinsicList.push_back({BuiltinName, Signature});

clang/unittests/Basic/DiagnosticTest.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
using namespace llvm;
1717
using namespace clang;
1818

19+
// Declare DiagnosticsTestHelper to avoid GCC warning
20+
namespace clang {
21+
void DiagnosticsTestHelper(DiagnosticsEngine &diag);
22+
}
23+
1924
void clang::DiagnosticsTestHelper(DiagnosticsEngine &diag) {
2025
EXPECT_FALSE(diag.DiagStates.empty());
2126
EXPECT_TRUE(diag.DiagStatesByLoc.empty());

clang/utils/TableGen/RISCVVEmitter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static VectorTypeModifier getTupleVTM(unsigned NF) {
169169

170170
static unsigned getIndexedLoadStorePtrIdx(const RVVIntrinsic *RVVI) {
171171
// We need a special rule for segment load/store since the data width is not
172-
// encoded in the instrinsic name itself.
172+
// encoded in the intrinsic name itself.
173173
const StringRef IRName = RVVI->getIRName();
174174
constexpr unsigned RVV_VTA = 0x1;
175175
constexpr unsigned RVV_VMA = 0x2;
@@ -192,7 +192,7 @@ static unsigned getIndexedLoadStorePtrIdx(const RVVIntrinsic *RVVI) {
192192
static unsigned getSegInstLog2SEW(StringRef InstName) {
193193
// clang-format off
194194
// We need a special rule for indexed segment load/store since the data width
195-
// is not encoded in the instrinsic name itself.
195+
// is not encoded in the intrinsic name itself.
196196
if (InstName.starts_with("vloxseg") || InstName.starts_with("vluxseg") ||
197197
InstName.starts_with("vsoxseg") || InstName.starts_with("vsuxseg"))
198198
return (unsigned)-1;

compiler-rt/lib/lsan/lsan_common.cpp

Lines changed: 49 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -288,23 +288,33 @@ static inline bool MaybeUserPointer(uptr p) {
288288
# endif
289289
}
290290

291+
namespace {
292+
struct DirectMemoryAccessor {
293+
void Init(uptr begin, uptr end) {};
294+
void *LoadPtr(uptr p) const { return *reinterpret_cast<void **>(p); }
295+
};
296+
} // namespace
297+
291298
// Scans the memory range, looking for byte patterns that point into allocator
292299
// chunks. Marks those chunks with |tag| and adds them to |frontier|.
293300
// There are two usage modes for this function: finding reachable chunks
294301
// (|tag| = kReachable) and finding indirectly leaked chunks
295302
// (|tag| = kIndirectlyLeaked). In the second case, there's no flood fill,
296303
// so |frontier| = 0.
297-
void ScanRangeForPointers(uptr begin, uptr end, Frontier *frontier,
298-
const char *region_type, ChunkTag tag) {
304+
template <class Accessor>
305+
void ScanForPointers(uptr begin, uptr end, Frontier *frontier,
306+
const char *region_type, ChunkTag tag,
307+
Accessor &accessor) {
299308
CHECK(tag == kReachable || tag == kIndirectlyLeaked);
300309
const uptr alignment = flags()->pointer_alignment();
301310
LOG_POINTERS("Scanning %s range %p-%p.\n", region_type, (void *)begin,
302311
(void *)end);
312+
accessor.Init(begin, end);
303313
uptr pp = begin;
304314
if (pp % alignment)
305315
pp = pp + alignment - pp % alignment;
306316
for (; pp + sizeof(void *) <= end; pp += alignment) {
307-
void *p = *reinterpret_cast<void **>(pp);
317+
void *p = accessor.LoadPtr(pp);
308318
# if SANITIZER_APPLE
309319
p = TransformPointer(p);
310320
# endif
@@ -339,6 +349,12 @@ void ScanRangeForPointers(uptr begin, uptr end, Frontier *frontier,
339349
}
340350
}
341351

352+
void ScanRangeForPointers(uptr begin, uptr end, Frontier *frontier,
353+
const char *region_type, ChunkTag tag) {
354+
DirectMemoryAccessor accessor;
355+
ScanForPointers(begin, end, frontier, region_type, tag, accessor);
356+
}
357+
342358
// Scans a global range for pointers
343359
void ScanGlobalRange(uptr begin, uptr end, Frontier *frontier) {
344360
uptr allocator_begin = 0, allocator_end = 0;
@@ -356,14 +372,21 @@ void ScanGlobalRange(uptr begin, uptr end, Frontier *frontier) {
356372
}
357373
}
358374

359-
void ScanExtraStackRanges(const InternalMmapVector<Range> &ranges,
360-
Frontier *frontier) {
375+
template <class Accessor>
376+
void ScanExtraStack(const InternalMmapVector<Range> &ranges, Frontier *frontier,
377+
Accessor &accessor) {
361378
for (uptr i = 0; i < ranges.size(); i++) {
362-
ScanRangeForPointers(ranges[i].begin, ranges[i].end, frontier, "FAKE STACK",
363-
kReachable);
379+
ScanForPointers(ranges[i].begin, ranges[i].end, frontier, "FAKE STACK",
380+
kReachable, accessor);
364381
}
365382
}
366383

384+
void ScanExtraStackRanges(const InternalMmapVector<Range> &ranges,
385+
Frontier *frontier) {
386+
DirectMemoryAccessor accessor;
387+
ScanExtraStack(ranges, frontier, accessor);
388+
}
389+
367390
# if SANITIZER_FUCHSIA
368391

369392
// Fuchsia handles all threads together with its own callback.
@@ -399,10 +422,11 @@ static void ProcessThreadRegistry(Frontier *frontier) {
399422
}
400423

401424
// Scans thread data (stacks and TLS) for heap pointers.
425+
template <class Accessor>
402426
static void ProcessThread(tid_t os_id, uptr sp,
403427
const InternalMmapVector<uptr> &registers,
404428
InternalMmapVector<Range> &extra_ranges,
405-
Frontier *frontier) {
429+
Frontier *frontier, Accessor &accessor) {
406430
// `extra_ranges` is outside of the function and the loop to reused mapped
407431
// memory.
408432
CHECK(extra_ranges.empty());
@@ -426,8 +450,8 @@ static void ProcessThread(tid_t os_id, uptr sp,
426450
uptr registers_begin = reinterpret_cast<uptr>(registers.data());
427451
uptr registers_end =
428452
reinterpret_cast<uptr>(registers.data() + registers.size());
429-
ScanRangeForPointers(registers_begin, registers_end, frontier, "REGISTERS",
430-
kReachable);
453+
ScanForPointers(registers_begin, registers_end, frontier, "REGISTERS",
454+
kReachable, accessor);
431455
}
432456

433457
if (flags()->use_stacks) {
@@ -451,9 +475,10 @@ static void ProcessThread(tid_t os_id, uptr sp,
451475
// Shrink the stack range to ignore out-of-scope values.
452476
stack_begin = sp;
453477
}
454-
ScanRangeForPointers(stack_begin, stack_end, frontier, "STACK", kReachable);
478+
ScanForPointers(stack_begin, stack_end, frontier, "STACK", kReachable,
479+
accessor);
455480
GetThreadExtraStackRangesLocked(os_id, &extra_ranges);
456-
ScanExtraStackRanges(extra_ranges, frontier);
481+
ScanExtraStack(extra_ranges, frontier, accessor);
457482
}
458483

459484
if (flags()->use_tls) {
@@ -463,21 +488,23 @@ static void ProcessThread(tid_t os_id, uptr sp,
463488
// otherwise, only scan the non-overlapping portions
464489
if (cache_begin == cache_end || tls_end < cache_begin ||
465490
tls_begin > cache_end) {
466-
ScanRangeForPointers(tls_begin, tls_end, frontier, "TLS", kReachable);
491+
ScanForPointers(tls_begin, tls_end, frontier, "TLS", kReachable,
492+
accessor);
467493
} else {
468494
if (tls_begin < cache_begin)
469-
ScanRangeForPointers(tls_begin, cache_begin, frontier, "TLS",
470-
kReachable);
495+
ScanForPointers(tls_begin, cache_begin, frontier, "TLS", kReachable,
496+
accessor);
471497
if (tls_end > cache_end)
472-
ScanRangeForPointers(cache_end, tls_end, frontier, "TLS", kReachable);
498+
ScanForPointers(cache_end, tls_end, frontier, "TLS", kReachable,
499+
accessor);
473500
}
474501
}
475502
# if SANITIZER_ANDROID
476503
auto *cb = +[](void *dtls_begin, void *dtls_end, uptr /*dso_idd*/,
477504
void *arg) -> void {
478-
ScanRangeForPointers(
505+
ScanForPointers(
479506
reinterpret_cast<uptr>(dtls_begin), reinterpret_cast<uptr>(dtls_end),
480-
reinterpret_cast<Frontier *>(arg), "DTLS", kReachable);
507+
reinterpret_cast<Frontier *>(arg), "DTLS", kReachable, accessor);
481508
};
482509

483510
// FIXME: There might be a race-condition here (and in Bionic) if the
@@ -492,8 +519,8 @@ static void ProcessThread(tid_t os_id, uptr sp,
492519
if (dtls_beg < dtls_end) {
493520
LOG_THREADS("DTLS %d at %p-%p.\n", id, (void *)dtls_beg,
494521
(void *)dtls_end);
495-
ScanRangeForPointers(dtls_beg, dtls_end, frontier, "DTLS",
496-
kReachable);
522+
ScanForPointers(dtls_beg, dtls_end, frontier, "DTLS", kReachable,
523+
accessor);
497524
}
498525
});
499526
} else {
@@ -530,7 +557,8 @@ static void ProcessThreads(SuspendedThreadsList const &suspended_threads,
530557
if (os_id == caller_tid)
531558
sp = caller_sp;
532559

533-
ProcessThread(os_id, sp, registers, extra_ranges, frontier);
560+
DirectMemoryAccessor accessor;
561+
ProcessThread(os_id, sp, registers, extra_ranges, frontier, accessor);
534562
}
535563

536564
// Add pointers reachable from ThreadContexts

compiler-rt/test/ubsan/TestCases/Misc/Posix/static-link.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
// RUN: %clangxx -fsanitize=bool -static %s -o %t && env UBSAN_OPTIONS=handle_segv=0:handle_sigbus=0:handle_sigfpe=0 %run %t 2>&1 | FileCheck %s
2+
// RUN: %run %t 2>&1 | FileCheck %s
3+
14
// REQUIRES: ubsan-standalone
25
// REQUIRES: target={{x86_64.*}}
36
// UNSUPPORTED: i386-target-arch, internal_symbolizer
4-
// RUN: %clangxx -fsanitize=bool -static %s -o %t && env UBSAN_OPTIONS=handle_segv=0:handle_sigbus=0:handle_sigfpe=0 %run %t 2>&1 | FileCheck %s
5-
// RUN: %run %t 2>&1 | FileCheck %s
7+
8+
// Does not link.
9+
// UNSUPPORTED: darwin
10+
611
#include <signal.h>
712
#include <stdio.h>
813

flang/docs/OptionComparison.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ eN
5353
</td>
5454
<td>fdec,
5555
<p>
56-
fall-instrinsics
56+
fall-intrinsics
5757
</td>
5858
<td><a href="https://www-01.ibm.com/support/docview.wss?uid=swg27024803&aid=1#page=297">qxlf77</a>,
5959
<p>

flang/include/flang/Runtime/magic-numbers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The denorm value is a nonstandard extension.
107107

108108
#if 0
109109
ieee_round_type values
110-
The values are those of the llvm.get.rounding instrinsic, which is assumed by
110+
The values are those of the llvm.get.rounding intrinsic, which is assumed by
111111
ieee_arithmetic module rounding procedures.
112112
#endif
113113
#define _FORTRAN_RUNTIME_IEEE_TO_ZERO 0

flang/lib/Evaluate/intrinsics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ std::optional<SpecificCall> IntrinsicInterface::Match(
16901690
// MAX and MIN (and others that map to them) allow their last argument to
16911691
// be repeated indefinitely. The actualForDummy vector is sized
16921692
// and null-initialized to the non-repeated dummy argument count
1693-
// for other instrinsics.
1693+
// for other intrinsics.
16941694
bool isMaxMin{dummyArgPatterns > 0 &&
16951695
dummy[dummyArgPatterns - 1].optionality == Optionality::repeats};
16961696
std::vector<ActualArgument *> actualForDummy(

flang/lib/Optimizer/Builder/Runtime/Numeric.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ struct ForcedSpacing16 {
284284
}
285285
};
286286

287-
/// Generate call to Exponent instrinsic runtime routine.
287+
/// Generate call to Exponent intrinsic runtime routine.
288288
mlir::Value fir::runtime::genExponent(fir::FirOpBuilder &builder,
289289
mlir::Location loc, mlir::Type resultType,
290290
mlir::Value x) {
@@ -320,7 +320,7 @@ mlir::Value fir::runtime::genExponent(fir::FirOpBuilder &builder,
320320
return builder.create<fir::CallOp>(loc, func, args).getResult(0);
321321
}
322322

323-
/// Generate call to Fraction instrinsic runtime routine.
323+
/// Generate call to Fraction intrinsic runtime routine.
324324
mlir::Value fir::runtime::genFraction(fir::FirOpBuilder &builder,
325325
mlir::Location loc, mlir::Value x) {
326326
mlir::func::FuncOp func;
@@ -596,7 +596,7 @@ mlir::Value fir::runtime::genSelectedRealKind(fir::FirOpBuilder &builder,
596596
return builder.create<fir::CallOp>(loc, func, args).getResult(0);
597597
}
598598

599-
/// Generate call to Set_exponent instrinsic runtime routine.
599+
/// Generate call to Set_exponent intrinsic runtime routine.
600600
mlir::Value fir::runtime::genSetExponent(fir::FirOpBuilder &builder,
601601
mlir::Location loc, mlir::Value x,
602602
mlir::Value i) {

flang/lib/Optimizer/Builder/Runtime/Reduction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ mlir::Value fir::runtime::genSum(fir::FirOpBuilder &builder, mlir::Location loc,
15131513

15141514
// The IAll, IAny and IParity intrinsics have essentially the same
15151515
// implementation. This macro will generate the function body given the
1516-
// instrinsic name.
1516+
// intrinsic name.
15171517
#define GEN_IALL_IANY_IPARITY(F) \
15181518
mlir::Value fir::runtime::JOIN2(gen, F)( \
15191519
fir::FirOpBuilder & builder, mlir::Location loc, mlir::Value arrayBox, \

libc/docs/configure.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ to learn about the defaults for your platform and target.
3333
* **"general" options**
3434
- ``LIBC_ADD_NULL_CHECKS``: Add nullptr checks in the library's implementations to some functions for which passing nullptr is undefined behavior.
3535
* **"math" options**
36-
- ``LIBC_CONF_FREXP_INF_NAN_EXPONENT``: Set the specific exp value for Inf/NaN inputs.
36+
- ``LIBC_CONF_FREXP_INF_NAN_EXPONENT``: The value written back to the second parameter when calling frexp/frexpf/frexpl` with `+/-Inf`/`NaN` is unspecified. Configue an explicit exp value for Inf/NaN inputs.
3737
- ``LIBC_CONF_MATH_OPTIMIZATIONS``: Configures optimizations for math functions. Values accepted are LIBC_MATH_SKIP_ACCURATE_PASS, LIBC_MATH_SMALL_TABLES, LIBC_MATH_NO_ERRNO, LIBC_MATH_NO_EXCEPT, and LIBC_MATH_FAST.
3838
* **"printf" options**
3939
- ``LIBC_CONF_PRINTF_DISABLE_FIXED_POINT``: Disable printing fixed point values in printf and friends.

libc/src/math/generic/atan2f.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,18 @@ LLVM_LIBC_FUNCTION(float, atan2f, (float y, float x)) {
246246
uint32_t y_abs = y_bits.uintval();
247247
uint32_t max_abs = x_abs > y_abs ? x_abs : y_abs;
248248
uint32_t min_abs = x_abs <= y_abs ? x_abs : y_abs;
249+
float num_f = FPBits(min_abs).get_val();
250+
float den_f = FPBits(max_abs).get_val();
251+
double num_d = static_cast<double>(num_f);
252+
double den_d = static_cast<double>(den_f);
249253

250-
if (LIBC_UNLIKELY(max_abs >= 0x7f80'0000U || min_abs == 0U)) {
254+
if (LIBC_UNLIKELY(max_abs >= 0x7f80'0000U || num_d == 0.0)) {
251255
if (x_bits.is_nan() || y_bits.is_nan())
252256
return FPBits::quiet_nan().get_val();
253-
size_t x_except = x_abs == 0 ? 0 : (x_abs == 0x7f80'0000 ? 2 : 1);
254-
size_t y_except = y_abs == 0 ? 0 : (y_abs == 0x7f80'0000 ? 2 : 1);
257+
double x_d = static_cast<double>(x);
258+
double y_d = static_cast<double>(y);
259+
size_t x_except = (x_d == 0.0) ? 0 : (x_abs == 0x7f80'0000 ? 2 : 1);
260+
size_t y_except = (y_d == 0.0) ? 0 : (y_abs == 0x7f80'0000 ? 2 : 1);
255261

256262
// Exceptional cases:
257263
// EXCEPT[y_except][x_except][x_is_neg]
@@ -275,8 +281,6 @@ LLVM_LIBC_FUNCTION(float, atan2f, (float y, float x)) {
275281
bool recip = x_abs < y_abs;
276282
double final_sign = IS_NEG[(x_sign != y_sign) != recip];
277283
fputil::DoubleDouble const_term = CONST_ADJ[x_sign][y_sign][recip];
278-
double num_d = static_cast<double>(FPBits(min_abs).get_val());
279-
double den_d = static_cast<double>(FPBits(max_abs).get_val());
280284
double q_d = num_d / den_d;
281285

282286
double k_d = fputil::nearest_integer(q_d * 0x1.0p4f);

0 commit comments

Comments
 (0)