[PATCH] D30207: [ARM] Fix constant islands pass.

Roger Ferrer Ibanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 09:05:39 PST 2017


rogfer01 created this revision.
Herald added a subscriber: aemerson.

The pass tries to fix a spill of LR that turns out to be unnecessary.
So it removes the tPOP but forgets to remove tPUSH.
This causes the stack be misaligned upon returning the function.

Thus, remove the tPUSH as well in this case.

The test looks a bit long but this problem is only observed in relatively
large functions requiring a large number of literals and a large
number of near branches. This test was reduced using bugpoint and
cannot be reduced further.


https://reviews.llvm.org/D30207

Files:
  lib/Target/ARM/ARMConstantIslandPass.cpp
  test/CodeGen/Thumb/remove-unneeded-push-pop.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30207.89226.patch
Type: text/x-patch
Size: 43546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170221/fbffdedc/attachment.bin>


More information about the llvm-commits mailing list