diff options
author | Hal Finkel <hfinkel@anl.gov> | 2013-05-16 16:52:41 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2013-05-16 16:52:41 +0000 |
commit | 2a5e8c328eb0d957f00190c0c6189a4f1fef1117 (patch) | |
tree | 2c7289bb9b2283f5de88b99124ff98623f157dcc /lib/Target/PowerPC/PPCCTRLoops.cpp | |
parent | 3e521a5223e548748725c8b19d964d8e6de4fc82 (diff) | |
download | llvm-2a5e8c328eb0d957f00190c0c6189a4f1fef1117.tar.gz llvm-2a5e8c328eb0d957f00190c0c6189a4f1fef1117.tar.bz2 llvm-2a5e8c328eb0d957f00190c0c6189a4f1fef1117.tar.xz |
PPC32 cannot form counter loops around i64 FP conversions
On PPC32, i64 FP conversions are implemented using runtime calls (which clobber
the counter register). These must be excluded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCCTRLoops.cpp')
-rw-r--r-- | lib/Target/PowerPC/PPCCTRLoops.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCCTRLoops.cpp b/lib/Target/PowerPC/PPCCTRLoops.cpp index ae5d918460..6bbd571894 100644 --- a/lib/Target/PowerPC/PPCCTRLoops.cpp +++ b/lib/Target/PowerPC/PPCCTRLoops.cpp @@ -305,7 +305,11 @@ bool PPCCTRLoops::convertToCTRLoop(Loop *L) { isa<FPToUIInst>(J) || isa<FPToSIInst>(J)) { CastInst *CI = cast<CastInst>(J); if (CI->getSrcTy()->getScalarType()->isPPC_FP128Ty() || - CI->getDestTy()->getScalarType()->isPPC_FP128Ty()) + CI->getDestTy()->getScalarType()->isPPC_FP128Ty() || + (TT.isArch32Bit() && + (CI->getSrcTy()->getScalarType()->isIntegerTy(64) || + CI->getDestTy()->getScalarType()->isIntegerTy(64)) + )) return MadeChange; } else if (isa<IndirectBrInst>(J) || isa<InvokeInst>(J)) { // On PowerPC, indirect jumps use the counter register. |