Skip to content

Commit 94b4598

Browse files
committed
[PS4] stp[n]cpy not available on PS4
1 parent cf521e7 commit 94b4598

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

llvm/lib/Analysis/TargetLibraryInfo.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,11 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T,
595595
TLI.setUnavailable(LibFunc_stpncpy);
596596
}
597597

598+
if (T.isPS4()) {
599+
TLI.setUnavailable(LibFunc_stpcpy);
600+
TLI.setUnavailable(LibFunc_stpncpy);
601+
}
602+
598603
// As currently implemented in clang, NVPTX code has no standard library to
599604
// speak of. Headers provide a standard-ish library implementation, but many
600605
// of the signatures are wrong -- for example, many libm functions are not

llvm/test/Transforms/InstCombine/sprintf-1.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
; RUN: opt < %s -mtriple=i386-mingw32 -instcombine -S | FileCheck %s --check-prefixes=CHECK,WIN,NOSTPCPY
88
; RUN: opt < %s -mtriple=armv7-none-linux-android16 -instcombine -S | FileCheck %s --check-prefixes=CHECK,NOSTPCPY
99
; RUN: opt < %s -mtriple=armv7-none-linux-android21 -instcombine -S | FileCheck %s --check-prefixes=CHECK,WITHSTPCPY
10+
; RUN: opt < %s -mtriple=x86_64-scei-ps4 -instcombine -S | FileCheck %s --check-prefixes=CHECK,NOSTPCPY
11+
1012

1113
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
1214

0 commit comments

Comments
 (0)