[PATCH] D95881: [ARM] Extend search for increment in load/store optimizer

Simon Tatham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 07:33:30 PST 2021


simon_tatham added a comment.

What happens about a case like the following:

  mov r0, sp
  ldrd r1, r2, [sp]
  ldr r3, [r0]
  add sp, sp, #8

In this case, the LDR of r3 is not directly reading or modifying SP, but it is nonetheless dependent on SP not having been incremented yet, because it's accessing the stack slot that becomes invalid as soon as SP is increased. I don't see any check for that situation here.


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

https://reviews.llvm.org/D95881



More information about the llvm-commits mailing list