Pretty print shuffle mask operand.
authorEvan Cheng <evan.cheng@apple.com>
Tue, 11 Dec 2007 02:08:35 +0000 (02:08 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 11 Dec 2007 02:08:35 +0000 (02:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44837 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index 38987d9faada73e96c561699f660f36563d8b9e8..a93a41dfc98afbee782eab6d6c3c984cfd042046 100644 (file)
@@ -3855,6 +3855,19 @@ void SDNode::dump(const SelectionDAG *G) const {
       cerr << ":" << RN;
   }
 
+  if (!isTargetOpcode() && getOpcode() == ISD::VECTOR_SHUFFLE) {
+    SDNode *Mask = getOperand(2).Val;
+    cerr << "<";
+    for (unsigned i = 0, e = Mask->getNumOperands(); i != e; ++i) {
+      if (i) cerr << ",";
+      if (Mask->getOperand(i).getOpcode() == ISD::UNDEF)
+        cerr << "u";
+      else
+        cerr << cast<ConstantSDNode>(Mask->getOperand(i))->getValue();
+    }
+    cerr << ">";
+  }
+
   if (const ConstantSDNode *CSDN = dyn_cast<ConstantSDNode>(this)) {
     cerr << "<" << CSDN->getValue() << ">";
   } else if (const ConstantFPSDNode *CSDN = dyn_cast<ConstantFPSDNode>(this)) {