[llvm] 6419fb5 - [GISel] Don't print the opcode twice in LegalityQuery::print. (#74232)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 13:45:58 PST 2023


Author: Craig Topper
Date: 2023-12-06T13:45:53-08:00
New Revision: 6419fb51678ec8c648e311256ecc0498576b2066

URL: https://github.com/llvm/llvm-project/commit/6419fb51678ec8c648e311256ecc0498576b2066
DIFF: https://github.com/llvm/llvm-project/commit/6419fb51678ec8c648e311256ecc0498576b2066.diff

LOG: [GISel] Don't print the opcode twice in LegalityQuery::print. (#74232)

Added: 
    

Modified: 
    llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
index 9b5f3a4b6fa1d..de9931d1c240f 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
@@ -77,13 +77,11 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, LegalizeAction Action) {
 }
 
 raw_ostream &LegalityQuery::print(raw_ostream &OS) const {
-  OS << Opcode << ", Tys={";
+  OS << "Opcode=" << Opcode << ", Tys={";
   for (const auto &Type : Types) {
     OS << Type << ", ";
   }
-  OS << "}, Opcode=";
-
-  OS << Opcode << ", MMOs={";
+  OS << "}, MMOs={";
   for (const auto &MMODescr : MMODescrs) {
     OS << MMODescr.MemoryTy << ", ";
   }


        


More information about the llvm-commits mailing list