[llvm] 49fa6ab - Revert "GlobalISel: Use MMO helper for getting the size in bits"

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 29 14:38:57 PDT 2021


Author: Matt Arsenault
Date: 2021-06-29T17:38:51-04:00
New Revision: 49fa6abf7472022d7bf1fb05df3033a7bd1ff0de

URL: https://github.com/llvm/llvm-project/commit/49fa6abf7472022d7bf1fb05df3033a7bd1ff0de
DIFF: https://github.com/llvm/llvm-project/commit/49fa6abf7472022d7bf1fb05df3033a7bd1ff0de.diff

LOG: Revert "GlobalISel: Use MMO helper for getting the size in bits"

This reverts commit dc98adfb448bdb845605185bb173e99614a17790.

This should still be done, but this is currently causing some commit
ordering issues.

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 0e004a7fc1178..c757cb65947e6 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
@@ -352,7 +352,8 @@ LegalizerInfo::getAction(const MachineInstr &MI,
 
   SmallVector<LegalityQuery::MemDesc, 2> MemDescrs;
   for (const auto &MMO : MI.memoperands())
-    MemDescrs.push_back({MMO->getSizeInBits(), 8 * MMO->getAlign().value(),
+    MemDescrs.push_back({8 * MMO->getSize() /* in bits */,
+                         8 * MMO->getAlign().value(),
                          MMO->getSuccessOrdering()});
 
   return getAction({MI.getOpcode(), Types, MemDescrs});


        


More information about the llvm-commits mailing list