[PATCH] D142777: [RISCV] Add asserts that we don't increase codesize during pseudo expansion

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 12:18:20 PST 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVExpandAtomicPseudoInsts.cpp:81
+      NewSize += TII->getInstSizeInBytes(MI);
+  assert(OldSize >= NewSize);
   return Modified;
----------------
Will this warn in release builds? Should we put #ifndef NDEBUG around the loops?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142777



More information about the llvm-commits mailing list