[llvm] ac2ad3b - [PS5] Support sin+cos->sincos optimization
Paul Robinson via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 15 09:36:15 PDT 2022
Author: Paul Robinson
Date: 2022-06-15T09:36:05-07:00
New Revision: ac2ad3b7bb920598ed6366eba23f157039927639
URL: https://github.com/llvm/llvm-project/commit/ac2ad3b7bb920598ed6366eba23f157039927639
DIFF: https://github.com/llvm/llvm-project/commit/ac2ad3b7bb920598ed6366eba23f157039927639.diff
LOG: [PS5] Support sin+cos->sincos optimization
Added:
Modified:
llvm/lib/CodeGen/TargetLoweringBase.cpp
llvm/test/CodeGen/X86/sincos-opt.ll
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index deb209fa4724..6a595a4c748b 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -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");
}
diff --git a/llvm/test/CodeGen/X86/sincos-opt.ll b/llvm/test/CodeGen/X86/sincos-opt.ll
index 821f2b144872..68854569febb 100644
--- a/llvm/test/CodeGen/X86/sincos-opt.ll
+++ b/llvm/test/CodeGen/X86/sincos-opt.ll
@@ -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
More information about the llvm-commits
mailing list