mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
OS X: the correct function is __sincospif_stret, not __sincospi_stretf
rdar://problem/13729466 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200771 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f9ced85e49
commit
8f0354c973
@ -67,8 +67,8 @@ namespace llvm {
|
||||
memcpy_chk,
|
||||
/// double __sincospi_stret(double x);
|
||||
sincospi_stret,
|
||||
/// float __sincospi_stretf(float x);
|
||||
sincospi_stretf,
|
||||
/// float __sincospif_stret(float x);
|
||||
sincospif_stret,
|
||||
/// double __sinpi(double x);
|
||||
sinpi,
|
||||
/// float __sinpif(float x);
|
||||
|
@ -48,7 +48,7 @@ const char* TargetLibraryInfo::StandardNames[LibFunc::NumLibFuncs] =
|
||||
"__isoc99_sscanf",
|
||||
"__memcpy_chk",
|
||||
"__sincospi_stret",
|
||||
"__sincospi_stretf",
|
||||
"__sincospif_stret",
|
||||
"__sinpi",
|
||||
"__sinpif",
|
||||
"__sqrt_finite",
|
||||
@ -393,7 +393,7 @@ static void initialize(TargetLibraryInfo &TLI, const Triple &T,
|
||||
TLI.setUnavailable(LibFunc::cospi);
|
||||
TLI.setUnavailable(LibFunc::cospif);
|
||||
TLI.setUnavailable(LibFunc::sincospi_stret);
|
||||
TLI.setUnavailable(LibFunc::sincospi_stretf);
|
||||
TLI.setUnavailable(LibFunc::sincospif_stret);
|
||||
}
|
||||
|
||||
if (T.isMacOSX() && T.getArch() == Triple::x86 &&
|
||||
|
@ -1386,7 +1386,7 @@ struct SinCosPiOpt : public LibCallOptimization {
|
||||
SinCalls.push_back(CI);
|
||||
else if (Func == LibFunc::cospif)
|
||||
CosCalls.push_back(CI);
|
||||
else if (Func == LibFunc::sincospi_stretf)
|
||||
else if (Func == LibFunc::sincospif_stret)
|
||||
SinCosCalls.push_back(CI);
|
||||
} else {
|
||||
if (Func == LibFunc::sinpi)
|
||||
@ -1415,7 +1415,7 @@ struct SinCosPiOpt : public LibCallOptimization {
|
||||
|
||||
Triple T(OrigCallee->getParent()->getTargetTriple());
|
||||
if (UseFloat) {
|
||||
Name = "__sincospi_stretf";
|
||||
Name = "__sincospif_stret";
|
||||
|
||||
assert(T.getArch() != Triple::x86 && "x86 messy and unsupported for now");
|
||||
// x86_64 can't use {float, float} since that would be returned in both
|
||||
|
@ -23,12 +23,12 @@ define float @test_instbased_f32() {
|
||||
%res = fadd float %sin, %cos
|
||||
ret float %res
|
||||
; CHECK-FLOAT-IN-VEC: [[VAL:%[a-z0-9]+]] = load float* @var32
|
||||
; CHECK-FLOAT-IN-VEC: [[SINCOS:%[a-z0-9]+]] = call <2 x float> @__sincospi_stretf(float [[VAL]])
|
||||
; CHECK-FLOAT-IN-VEC: [[SINCOS:%[a-z0-9]+]] = call <2 x float> @__sincospif_stret(float [[VAL]])
|
||||
; CHECK-FLOAT-IN-VEC: extractelement <2 x float> [[SINCOS]], i32 0
|
||||
; CHECK-FLOAT-IN-VEC: extractelement <2 x float> [[SINCOS]], i32 1
|
||||
|
||||
; CHECK: [[VAL:%[a-z0-9]+]] = load float* @var32
|
||||
; CHECK: [[SINCOS:%[a-z0-9]+]] = call { float, float } @__sincospi_stretf(float [[VAL]])
|
||||
; CHECK: [[SINCOS:%[a-z0-9]+]] = call { float, float } @__sincospif_stret(float [[VAL]])
|
||||
; CHECK: extractvalue { float, float } [[SINCOS]], 0
|
||||
; CHECK: extractvalue { float, float } [[SINCOS]], 1
|
||||
|
||||
@ -41,11 +41,11 @@ define float @test_constant_f32() {
|
||||
%cos = call float @__cospif(float 1.0) #0
|
||||
%res = fadd float %sin, %cos
|
||||
ret float %res
|
||||
; CHECK-FLOAT-IN-VEC: [[SINCOS:%[a-z0-9]+]] = call <2 x float> @__sincospi_stretf(float 1.000000e+00)
|
||||
; CHECK-FLOAT-IN-VEC: [[SINCOS:%[a-z0-9]+]] = call <2 x float> @__sincospif_stret(float 1.000000e+00)
|
||||
; CHECK-FLOAT-IN-VEC: extractelement <2 x float> [[SINCOS]], i32 0
|
||||
; CHECK-FLOAT-IN-VEC: extractelement <2 x float> [[SINCOS]], i32 1
|
||||
|
||||
; CHECK: [[SINCOS:%[a-z0-9]+]] = call { float, float } @__sincospi_stretf(float 1.000000e+00)
|
||||
; CHECK: [[SINCOS:%[a-z0-9]+]] = call { float, float } @__sincospif_stret(float 1.000000e+00)
|
||||
; CHECK: extractvalue { float, float } [[SINCOS]], 0
|
||||
; CHECK: extractvalue { float, float } [[SINCOS]], 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user