[PS5] Support sin+cos->sincos optimization
authorPaul Robinson <paul.robinson@sony.com>
Wed, 15 Jun 2022 16:35:49 +0000 (09:35 -0700)
committerPaul Robinson <paul.robinson@sony.com>
Wed, 15 Jun 2022 16:36:05 +0000 (09:36 -0700)
llvm/lib/CodeGen/TargetLoweringBase.cpp
llvm/test/CodeGen/X86/sincos-opt.ll

index deb209f..6a595a4 100644 (file)
@@ -201,7 +201,7 @@ void TargetLoweringBase::InitLibcalls(const Triple &TT) {
     setLibcallName(RTLIB::SINCOS_PPCF128, "sincosl");
   }
 
-  if (TT.isPS4()) {
+  if (TT.isPS()) {
     setLibcallName(RTLIB::SINCOS_F32, "sincosf");
     setLibcallName(RTLIB::SINCOS_F64, "sincos");
   }
index 821f2b1..6885456 100644 (file)
@@ -6,6 +6,7 @@
 ; RUN: llc < %s -mtriple=x86_64-fuchsia -mcpu=core2 | FileCheck %s --check-prefix=GNU_SINCOS
 ; RUN: llc < %s -mtriple=x86_64-fuchsia -mcpu=core2 -enable-unsafe-fp-math | FileCheck %s --check-prefix=GNU_SINCOS_FASTMATH
 ; RUN: llc < %s -mtriple=x86_64-scei-ps4 -mcpu=btver2 | FileCheck %s --check-prefix=PS4_SINCOS
+; RUN: llc < %s -mtriple=x86_64-sie-ps5  -mcpu=znver2 | FileCheck %s --check-prefix=PS4_SINCOS
 
 ; Combine sin / cos into a single call unless they may write errno (as
 ; captured by readnone attrbiute, controlled by clang -fmath-errno