[PATCH] D111631: [AArch64][SVE] Fix handling of stack protection with SVE

John Brawn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 18 06:46:57 PST 2021


john.brawn updated this revision to Diff 388177.
john.brawn added a comment.

Looking into the interaction with LocalStackSlotAllocation it turned out things were more complicated than I thought as it's run before we had decided to put the stack protector in the SVE stack area. I've gone with moving that decision much earlier (instead of attempting to undo what LocalStackSlotAllocation had done).

The getelementptr interaction in HasAddressTaken also wasn't right. Instead of doing "isKnownLT" we have to do "!isKnownGE" as these functions false in the "don't know" case. We also have to be more careful about the subtraction, as you can't subtract a fixed value from a scalable value.


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

https://reviews.llvm.org/D111631

Files:
  llvm/include/llvm/CodeGen/StackProtector.h
  llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
  llvm/lib/CodeGen/PrologEpilogInserter.cpp
  llvm/lib/CodeGen/StackProtector.cpp
  llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/test/CodeGen/AArch64/stack-guard-reassign-sve.mir
  llvm/test/CodeGen/AArch64/stack-guard-sve.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111631.388177.patch
Type: text/x-patch
Size: 22009 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211118/2cad3793/attachment.bin>


More information about the llvm-commits mailing list