[X86] Use single add/sub for large stack offsets
authorRobert Lougher <rob.lougher@gmail.com>
Thu, 29 Jan 2015 16:18:29 +0000 (16:18 +0000)
committerRobert Lougher <rob.lougher@gmail.com>
Thu, 29 Jan 2015 16:18:29 +0000 (16:18 +0000)
commit1031549bec52ab3c5dd9f4dd7703e21bb5253bff
treec4e2afc6a05318ae6815f59eade0d3a539f0955e
parentc7260e2ffa87370ad56c3613de141178937eb17e
[X86] Use single add/sub for large stack offsets

For large stack offsets the compiler generates multiple immediate mode
sub/add instructions in the prologue/epilogue.  This patch makes the
compiler place the final amount to be added/subtracted into a register,
which is then added/substracted with a single operation.

Differential Revision: http://reviews.llvm.org/D7226

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227458 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FrameLowering.cpp
test/CodeGen/X86/huge-stack-offset.ll [new file with mode: 0644]