summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2015-08-24 19:27:27 +0000
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>2015-08-24 19:27:27 +0000
commit32fd189de27b1a9382098f73f8c402d6b2950c4d (patch)
treefb070f334603a45506498fdd17745df6c07f2fb1 /llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
parent6ca7e64d5f2059dba7fa12eefcf202a1353770ed (diff)
downloadbcm5719-llvm-32fd189de27b1a9382098f73f8c402d6b2950c4d.tar.gz
bcm5719-llvm-32fd189de27b1a9382098f73f8c402d6b2950c4d.zip
[PPC64LE] Fix PR24546 - Swap optimization and debug values
This patch fixes PR24546, which demonstrates a segfault during the VSX swap removal pass. The problem is that debug value instructions were not excluded from the list of instructions to be analyzed for webs of related computation. I've added the test case from the PR as a crash test in test/CodeGen/PowerPC. llvm-svn: 245862
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp b/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
index d9504710b3f..16f31adf3f3 100644
--- a/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
+++ b/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
@@ -245,6 +245,9 @@ bool PPCVSXSwapRemoval::gatherVectorInstructions() {
for (MachineBasicBlock &MBB : *MF) {
for (MachineInstr &MI : MBB) {
+ if (MI.isDebugValue())
+ continue;
+
bool RelevantInstr = false;
bool Partial = false;
OpenPOWER on IntegriCloud