[PATCH] D33443: Fix PR33031: Cannot scavenge register without an emergency spill slot.

Stephen Hines via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 24 18:46:02 PDT 2017


srhines added inline comments.


================
Comment at: lib/Target/AArch64/AArch64FrameLowering.cpp:1207
+  unsigned EstimatedStackSizeLimit = estimateRSStackSizeLimit(MF);
+  bool BigStack = (CFSize > EstimatedStackSizeLimit);
   if (BigStack || !CanEliminateFrame || RegInfo->cannotEliminateFrame(MF))
----------------
There is a subtle bug here. You have to use 255 for Limit in the estimateRSStackSizeLimit function now, because you aren't checking for >=. If the stack size is exactly 256 bytes, you wouldn't create the emergency spill slot, which is necessary because 256 can't be encoded as an offset.


https://reviews.llvm.org/D33443





More information about the llvm-commits mailing list