[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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210263 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SystemZ/SystemZTargetMachine.cpp

index 4c9ce29c7e2a1d02131bb8834aabbc44a097859b..1fca067ad2e2157031f246cccc57d8a521645e1a 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;
 }