[PATCH] D76570: [AArch64] Homogeneous Prolog and Epilog for Size Optimization

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 11 11:49:37 PST 2020


smeenai added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp:406
+  // # of instructions that will be outlined.
+  int InstCount = RegCount >> 1;
+
----------------
t.p.northover wrote:
> Let the compiler convert a divide to a shift, it's not the 80s.
If you're compiling without assertions, the compiler wouldn't be able to just generate a shift directly (because it has to account for negative numbers), right? You'd need something like a `__builtin_assume` to get just the shift to be generated. (See https://godbolt.org/z/vzx9hx)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76570



More information about the llvm-commits mailing list