diff options
author | Hal Finkel <hfinkel@anl.gov> | 2013-08-19 23:35:24 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2013-08-19 23:35:24 +0000 |
commit | 30cbccb029b01738202bd04341b1cbf68a7814c9 (patch) | |
tree | ab75a4420b789d4acb234ac64e049193e5cf6753 /lib/Target/PowerPC/PPCCTRLoops.cpp | |
parent | ff9fa05905be716435460b5f6d32689041bf895b (diff) | |
download | llvm-30cbccb029b01738202bd04341b1cbf68a7814c9.tar.gz llvm-30cbccb029b01738202bd04341b1cbf68a7814c9.tar.bz2 llvm-30cbccb029b01738202bd04341b1cbf68a7814c9.tar.xz |
Don't form PPC CTR-based loops around a copysignl call
copysign/copysignf never become function calls (because the SDAG expansion code
does not lower to the corresponding function call, but rather directly
implements the associated logic), but copysignl almost always is lowered into a
call to the requested libm functon (and, thus, might clobber CTR).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188727 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCCTRLoops.cpp')
-rw-r--r-- | lib/Target/PowerPC/PPCCTRLoops.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCCTRLoops.cpp b/lib/Target/PowerPC/PPCCTRLoops.cpp index 05dad8a094..d9f132363b 100644 --- a/lib/Target/PowerPC/PPCCTRLoops.cpp +++ b/lib/Target/PowerPC/PPCCTRLoops.cpp @@ -284,8 +284,9 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) { default: return true; case LibFunc::copysign: case LibFunc::copysignf: - case LibFunc::copysignl: continue; // ISD::FCOPYSIGN is never a library call. + case LibFunc::copysignl: + return true; case LibFunc::fabs: case LibFunc::fabsf: case LibFunc::fabsl: |