summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCInstrInfo.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-04-18 22:54:25 +0000
committerHal Finkel <hfinkel@anl.gov>2013-04-18 22:54:25 +0000
commit4029c3feed5c9a5b0793e3da140ecaabef19e3fe (patch)
treea3612693471961fbbc1ccb3a6175fe628cc55d68 /lib/Target/PowerPC/PPCInstrInfo.cpp
parent88eb89b89f9426feb7be9b19d1a664b37c590bdb (diff)
downloadllvm-4029c3feed5c9a5b0793e3da140ecaabef19e3fe.tar.gz
llvm-4029c3feed5c9a5b0793e3da140ecaabef19e3fe.tar.bz2
llvm-4029c3feed5c9a5b0793e3da140ecaabef19e3fe.tar.xz
Disable PPC comparison optimization by default
This seems to cause a stage-2 LLVM compile failure (by crashing TableGen); do I'm disabling this for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179807 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCInstrInfo.cpp')
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCInstrInfo.cpp b/lib/Target/PowerPC/PPCInstrInfo.cpp
index b78f071ef6..cd50bb5306 100644
--- a/lib/Target/PowerPC/PPCInstrInfo.cpp
+++ b/lib/Target/PowerPC/PPCInstrInfo.cpp
@@ -42,6 +42,9 @@ static cl::
opt<bool> DisableCTRLoopAnal("disable-ppc-ctrloop-analysis", cl::Hidden,
cl::desc("Disable analysis for CTR loops"));
+static cl::opt<bool> DisableCmpOpt("disable-ppc-cmp-opt", cl::init(true),
+cl::desc("Disable compare instruction optimization"), cl::Hidden);
+
PPCInstrInfo::PPCInstrInfo(PPCTargetMachine &tm)
: PPCGenInstrInfo(PPC::ADJCALLSTACKDOWN, PPC::ADJCALLSTACKUP),
TM(tm), RI(*TM.getSubtargetImpl(), *this) {}
@@ -1088,6 +1091,9 @@ bool PPCInstrInfo::optimizeCompareInstr(MachineInstr *CmpInstr,
unsigned SrcReg, unsigned SrcReg2,
int Mask, int Value,
const MachineRegisterInfo *MRI) const {
+ if (DisableCmpOpt)
+ return false;
+
int OpC = CmpInstr->getOpcode();
unsigned CRReg = CmpInstr->getOperand(0).getReg();
bool isFP = OpC == PPC::FCMPUS || OpC == PPC::FCMPUD;