diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp index 2e950a1b0d593..8ebdb65e88dc6 100644 --- a/llvm/lib/Analysis/TargetLibraryInfo.cpp +++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp @@ -659,12 +659,12 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, TLI.setUnavailable(LibFunc_stpncpy); } - if (T.isPS4()) { - // PS4 does have memalign. + if (T.isPS()) { + // PS4/PS5 do have memalign. TLI.setAvailable(LibFunc_memalign); - // PS4 does not have new/delete with "unsigned int" size parameter; - // it only has the "unsigned long" versions. + // PS4/PS5 do not have new/delete with "unsigned int" size parameter; + // they only have the "unsigned long" versions. TLI.setUnavailable(LibFunc_ZdaPvj); TLI.setUnavailable(LibFunc_ZdaPvjSt11align_val_t); TLI.setUnavailable(LibFunc_ZdlPvj); diff --git a/llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml b/llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml index f2a54daf81629..d21c2c05ff290 100644 --- a/llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml +++ b/llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml @@ -1,8 +1,9 @@ # REQUIRES: x86-registered-target # -## This produces the object that matches expectations for PS4. +## This produces the object that matches expectations for PS4/PS5. # RUN: yaml2obj %s -DZDAPV=_ZdaPv -o=%t1 # RUN: llvm-tli-checker --triple=x86_64-scei-ps4 %t1 | FileCheck %s +# RUN: llvm-tli-checker --triple=x86_64-sie-ps5 %t1 | FileCheck %s # ## This produces an object that has _ZdaPvj instead of _ZdaPv. # RUN: yaml2obj %s -DZDAPV=_ZdaPvj -o=%t2