[PATCH] D75755: [AArch64][Fix] LdSt optimization generate premature stack-popping

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 10:29:00 PST 2020


efriedma added a comment.

I think there's a secondary problem here: if we move an SP adjustment, we might also need to adjust the unwind/debug info.  This is particularly nasty on Windows, where messing up the unwind info can actually cause a miscompile.

If you don't want to spend the time to try to figure that out, I'd be happy to just completely forbid optimizing sp adjustments here.  It should be rare enough that it doesn't matter much in practice.



================
Comment at: llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp:1832
+        }
+        if (PSVa->mayAlias(MFI)){
+          MayAliasFP = true;
----------------
I'm not sure what you think this mayAlias check is doing?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75755





More information about the llvm-commits mailing list