Skip to content

[libc][NFC] Tighten up guard conditions for sqrt and polyeval #93791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion libc/src/__support/FPUtil/sqrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
#define LLVM_LIBC_SRC___SUPPORT_FPUTIL_SQRT_H

#include "src/__support/macros/properties/architectures.h"
#include "src/__support/macros/properties/cpu_features.h"

#if defined(LIBC_TARGET_ARCH_IS_X86_64)
#if defined(LIBC_TARGET_ARCH_IS_X86_64) && defined(LIBC_TARGET_CPU_HAS_SSE2)
#include "x86_64/sqrt.h"
#elif defined(LIBC_TARGET_ARCH_IS_AARCH64)
#include "aarch64/sqrt.h"
Expand Down
85 changes: 0 additions & 85 deletions libc/src/__support/FPUtil/x86_64/PolyEval.h

This file was deleted.

5 changes: 3 additions & 2 deletions libc/src/__support/FPUtil/x86_64/sqrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@

#include "src/__support/common.h"
#include "src/__support/macros/properties/architectures.h"
#include "src/__support/macros/properties/cpu_features.h"

#if !defined(LIBC_TARGET_ARCH_IS_X86)
#error "Invalid include"
#if !(defined(LIBC_TARGET_ARCH_IS_X86_64) && defined(LIBC_TARGET_CPU_HAS_SSE2))
#error "sqrtss / sqrtsd need SSE2"
#endif

#include "src/__support/FPUtil/generic/sqrt.h"
Expand Down
Loading