diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2015-08-24 19:27:27 +0000 |
---|---|---|
committer | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2015-08-24 19:27:27 +0000 |
commit | 32fd189de27b1a9382098f73f8c402d6b2950c4d (patch) | |
tree | fb070f334603a45506498fdd17745df6c07f2fb1 /llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp | |
parent | 6ca7e64d5f2059dba7fa12eefcf202a1353770ed (diff) | |
download | bcm5719-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.cpp | 3 |
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; |