[PATCH] D68530: [AArch64] Don't combine callee-save and local stack adjustment when optimizing for size

Tom Tan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 1 21:49:49 PST 2019


TomTan added a comment.

Probably D18619 <https://reviews.llvm.org/D18619> doesn't handle vcall thunk as below correctly when stack bump is not combined (in `convertCalleeSaveRestoreToSPPrePostIncDec`). The produced code has the last second `add` instruction removed which leaves unbalanced stack.

  base_unittests!base::sequence_manager::TaskQueue::`vcall'{0}':
  00007ff6`cc9660bc d10103ff sub         sp,sp,#0x40
  00007ff6`cc9660c0 a9008be1 stp         x1,x2,[sp,#8]
  00007ff6`cc9660c4 a90193e3 stp         x3,x4,[sp,#0x18]
  00007ff6`cc9660c8 a9029be5 stp         x5,x6,[sp,#0x28]
  00007ff6`cc9660cc f9001fe7 str         x7,[sp,#0x38]
  00007ff6`cc9660d0 f9400009 ldr         x9,[x0]
  00007ff6`cc9660d4 f8440529 ldr         x9,[x9],#0x40
                             add         sp, #0x40
  00007ff6`cc9660d8 d61f0120 br          x9


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68530





More information about the llvm-commits mailing list