aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2009-05-29 10:28:44 +0000
committerTorok Edwin <edwintorok@gmail.com>2009-05-29 10:28:44 +0000
commit7e55a00d061629e5e38a1072d03618a5b76a8f9a (patch)
treebb6d7fba6cf6dd97dc50dd9d592d0eba50bb9039
parent3f3c6d4e5be4b916ed9d30ba85a428e01a65d8c5 (diff)
for instructions with void type we have no choice but print the instruction as
is, otherwise we get a <badref>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72567 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/GVN.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp
index 946c33eea4..bd13ee59b3 100644
--- a/lib/Transforms/Scalar/GVN.cpp
+++ b/lib/Transforms/Scalar/GVN.cpp
@@ -1165,7 +1165,10 @@ bool GVN::processLoad(LoadInst *L, SmallVectorImpl<Instruction*> &toErase) {
WriteAsOperand(*DOUT.stream(), L);
Instruction *I = dep.getInst();
DOUT << " is clobbered by " << I->getOpcodeName() << " instruction ";
- WriteAsOperand(*DOUT.stream(), I, false);
+ if (I->getType()->isFirstClassType())
+ WriteAsOperand(*DOUT.stream(), I, false);
+ else
+ DOUT << *I;
DOUT << "\n";
);
return false;