From 18cdc34be85c25e729257429b096bbb4f241daa8 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 24 Jan 2019 07:51:34 +0000 Subject: [PATCH] [X86] Update SelectionDAGDumper to print the extension type and expanding flag for masked loads. Add truncating and compressing for masked stores. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352029 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../SelectionDAG/SelectionDAGDumper.cpp | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp index e7d9668a876..4b0481cc2f5 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp @@ -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(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(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(this)) { OS << "<"; -- 2.50.1