]> granicus.if.org Git - llvm/commitdiff
[X86] Update SelectionDAGDumper to print the extension type and expanding flag for...
authorCraig Topper <craig.topper@intel.com>
Thu, 24 Jan 2019 07:51:34 +0000 (07:51 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 24 Jan 2019 07:51:34 +0000 (07:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352029 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp

index e7d9668a876c6cc710843dfd4cedc1a9a4a9cd6e..4b0481cc2f53771dee13616f965fbc4ed9c8b7d3 100644 (file)
@@ -651,6 +651,36 @@ void SDNode::print_details(raw_ostream &OS, const SelectionDAG *G) const {
     if (*AM)
       OS << ", " << AM;
 
+    OS << ">";
+  } else if (const MaskedLoadSDNode *MLd = dyn_cast<MaskedLoadSDNode>(this)) {
+    OS << "<";
+
+    printMemOperand(OS, *MLd->getMemOperand(), G);
+
+    bool doExt = true;
+    switch (MLd->getExtensionType()) {
+    default: doExt = false; break;
+    case ISD::EXTLOAD:  OS << ", anyext"; break;
+    case ISD::SEXTLOAD: OS << ", sext"; break;
+    case ISD::ZEXTLOAD: OS << ", zext"; break;
+    }
+    if (doExt)
+      OS << " from " << MLd->getMemoryVT().getEVTString();
+
+    if (MLd->isExpandingLoad())
+      OS << ", expanding";
+
+    OS << ">";
+  } else if (const MaskedStoreSDNode *MSt = dyn_cast<MaskedStoreSDNode>(this)) {
+    OS << "<";
+    printMemOperand(OS, *MSt->getMemOperand(), G);
+
+    if (MSt->isTruncatingStore())
+      OS << ", trunc to " << MSt->getMemoryVT().getEVTString();
+
+    if (MSt->isCompressingStore())
+      OS << ", compressing";
+
     OS << ">";
   } else if (const MemSDNode* M = dyn_cast<MemSDNode>(this)) {
     OS << "<";