Instead of printing "INTRINSIC" on intrinsic node, print the intrinsic name.
authorChris Lattner <sabre@nondot.org>
Mon, 27 Mar 2006 06:45:25 +0000 (06:45 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 27 Mar 2006 06:45:25 +0000 (06:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27164 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index c0cd64670117b263e1a28e6ebbbd264dece1e95e..ecda64c220c4775c8be61ac4d103a855030a533e 100644 (file)
@@ -14,6 +14,7 @@
 #include "llvm/CodeGen/SelectionDAG.h"
 #include "llvm/Constants.h"
 #include "llvm/GlobalValue.h"
+#include "llvm/Intrinsics.h"
 #include "llvm/Assembly/Writer.h"
 #include "llvm/CodeGen/MachineBasicBlock.h"
 #include "llvm/Support/MathExtras.h"
@@ -2665,7 +2666,10 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const {
   case ISD::FrameIndex:    return "FrameIndex";
   case ISD::ConstantPool:  return "ConstantPool";
   case ISD::ExternalSymbol: return "ExternalSymbol";
-  case ISD::INTRINSIC:     return "INTRINSIC";
+  case ISD::INTRINSIC:
+    bool hasChain = getOperand(0).getValueType() == MVT::Other;
+    unsigned IID = cast<ConstantSDNode>(getOperand(hasChain))->getValue();
+    return Intrinsic::getName((Intrinsic::ID)IID);
 
   case ISD::BUILD_VECTOR:   return "BUILD_VECTOR";
   case ISD::TargetConstant: return "TargetConstant";