[PATCH] D74311: [CodeGen] Fix the computation of the alignment of split stores.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 05:52:59 PST 2020


lebedev.ri added inline comments.


================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:6873
+    if (Upper && SI.getAlign()) {
+      // When the original store is aligned, the lower part has the same alignment.
+      // Find the best alignment for the upper part. 
----------------
On a first read, this is very confusing.
When splitting store in half, naturally one half will retain the alignment
of the original wider store, regardless of whether it was over-aligned or not,
while other will require adjustment.


================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:6875
+      // Find the best alignment for the upper part. 
+      Alignment = commonAlignment(SI.getAlign(), HalfValBitSize / 8);
+    }
----------------
Can the no-longer-pessimism of the computation be demonstrated by the tests?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74311





More information about the llvm-commits mailing list