================ @@ -212,6 +212,8 @@ uint64_t SIProgramInfo::getFunctionCodeSize(const MachineFunction &MF) { uint64_t CodeSize = 0; for (const MachineBasicBlock &MBB : MF) { + CodeSize = alignTo(CodeSize, MBB.getAlignment()); ---------------- efriedma-quic wrote:
This is not the right way to do this kind of math; you don't know how much padding the assembler is actually going to insert. Use a conservative estimate like `CodeSize += MBB.getAlignment() - 1`. See https://reviews.llvm.org/D150009 for further discussion. https://github.com/llvm/llvm-project/pull/127142 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits