[PATCH] D61432: Non-8-bit bytes showcase

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 2 04:54:29 PDT 2019


arsenm added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:215
+    /// Return number of bits per byte.
+    LLVM_READNONE unsigned bitsPerByte() const {
+      return DAG.getDataLayout().getBitsPerByte();
----------------
I believe this should be readonly


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:20001-20002
   // Add ST's interval.
-  Intervals.insert(0, (St->getMemoryVT().getSizeInBits() + 7) / 8, Unit);
+  Intervals.insert(0, (St->getMemoryVT().getSizeInBits() +
+                       (bitsPerByte() - 1)) / bitsPerByte(), Unit);
 
----------------
Should introduce a rounded size in bytes function somewhere


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61432/new/

https://reviews.llvm.org/D61432





More information about the llvm-commits mailing list