summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCTargetMachine.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2014-03-24 09:51:41 +0000
committerHal Finkel <hfinkel@anl.gov>2014-03-24 09:51:41 +0000
commit2393d22ca416e32ae6cce89bb6ef1a2aba629630 (patch)
treec6cf7898374012becb093cbefff957b4bc9dba6c /lib/Target/PowerPC/PPCTargetMachine.cpp
parent72448143b58b91d41ebc13087abc7ecebb2bd7e1 (diff)
downloadllvm-2393d22ca416e32ae6cce89bb6ef1a2aba629630.tar.gz
llvm-2393d22ca416e32ae6cce89bb6ef1a2aba629630.tar.bz2
llvm-2393d22ca416e32ae6cce89bb6ef1a2aba629630.tar.xz
[PowerPC] Don't schedule VSX copy legalization unless VSX is enabled
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
Diffstat (limited to 'lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--lib/Target/PowerPC/PPCTargetMachine.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
index 2449abf2ca..ff2263891f 100644
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -160,7 +160,8 @@ bool PPCPassConfig::addInstSelector() {
addPass(createPPCCTRLoopsVerify());
#endif
- addPass(createPPCVSXCopyPass());
+ if (getPPCSubtarget().hasVSX())
+ addPass(createPPCVSXCopyPass());
return false;
}