[SystemZ] Do not install IfConverter pass at -O0
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Thu, 5 Jun 2014 14:20:10 +0000 (14:20 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Thu, 5 Jun 2014 14:20:10 +0000 (14:20 +0000)
When not optimizing, do not run the IfConverter pass, this makes
debugging more difficult (and causes a testsuite failure in
DebugInfo/unconditional-branch.ll).

llvm-svn: 210263

llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp

index 4c9ce29..1fca067 100644 (file)
@@ -65,7 +65,8 @@ bool SystemZPassConfig::addInstSelector() {
 }
 
 bool SystemZPassConfig::addPreSched2() {
-  if (getSystemZTargetMachine().getSubtargetImpl()->hasLoadStoreOnCond())
+  if (getOptLevel() != CodeGenOpt::None &&
+      getSystemZTargetMachine().getSubtargetImpl()->hasLoadStoreOnCond())
     addPass(&IfConverterID);
   return true;
 }