[llvm] [llvm] Optimize MachineMemOperand::getAlign with KnownBits information (PR #143872)

Acthinks Yang via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 12 19:05:59 PDT 2025


================
@@ -1136,7 +1137,20 @@ void MachineMemOperand::refineAlignment(const MachineMemOperand *MMO) {
 /// getAlign - Return the minimum known alignment in bytes of the
 /// actual memory reference.
 Align MachineMemOperand::getAlign() const {
-  return commonAlignment(getBaseAlign(), getOffset());
+  Align RetAlign = commonAlignment(getBaseAlign(), getOffset());
----------------
Acthinks wrote:

Yes, handling it at the IR stage is more reasonable. Thank you!


https://github.com/llvm/llvm-project/pull/143872


More information about the llvm-commits mailing list