[PowerPC] Don't schedule VSX copy legalization unless VSX is enabled
authorHal Finkel <hfinkel@anl.gov>
Mon, 24 Mar 2014 09:51:41 +0000 (09:51 +0000)
committerHal Finkel <hfinkel@anl.gov>
Mon, 24 Mar 2014 09:51:41 +0000 (09:51 +0000)
There is no need to schedule this extra pass if it will have nothing to do.

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

lib/Target/PowerPC/PPCTargetMachine.cpp

index 2449abf2ca0e6e8ce839bc146e36f2c8b12dd537..ff2263891f7ddc6524fbfa04dfa5fedc14043dbc 100644 (file)
@@ -160,7 +160,8 @@ bool PPCPassConfig::addInstSelector() {
     addPass(createPPCCTRLoopsVerify());
 #endif
 
-  addPass(createPPCVSXCopyPass());
+  if (getPPCSubtarget().hasVSX())
+    addPass(createPPCVSXCopyPass());
 
   return false;
 }