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
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp
index 946c33e..bd13ee5 100644
--- a/lib/Transforms/Scalar/GVN.cpp
+++ b/lib/Transforms/Scalar/GVN.cpp
@@ -1165,7 +1165,10 @@
       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;