[PATCH] D76348: [Alignment][NFC] Deprecate getMaxAlignment

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 18 05:56:52 PDT 2020


courbet added inline comments.


================
Comment at: llvm/lib/Target/Mips/MipsSEFrameLowering.cpp:542
       Register VR = MF.getRegInfo().createVirtualRegister(RC);
-      assert(isInt<16>(MFI.getMaxAlignment()) &&
+      assert((Log2(MFI.getMaxAlign()) < 16) &&
              "Function's alignment size requirement is not supported.");
----------------
why `Log2` ?


================
Comment at: llvm/lib/Target/PowerPC/PPCFrameLowering.cpp:872
   if (HasBP && MaxAlign > 1)
-    assert(isPowerOf2_32(MaxAlign) && isInt<16>(MaxAlign) &&
-           "Invalid alignment!");
+    assert(Log2(MaxAlign) < 16 && "Invalid alignment!");
 
----------------
ditto


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76348





More information about the llvm-commits mailing list