Revert "[X86] Use push-pop for materializing small constants under 'minsize'"
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 5 Jan 2016 02:32:06 +0000 (02:32 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 5 Jan 2016 02:32:06 +0000 (02:32 +0000)
commit7f4aa70ca5194c85f162a0d040e939b69460bb69
treea8908a202d6a1d9712f3cf602cd7e6541f554049
parent46850ab55ff0898c7b0c9a18f51a99a093a2ed05
Revert "[X86] Use push-pop for materializing small constants under 'minsize'"

The red zone consists of 128 bytes beyond the stack pointer so that the
allocation of objects in leaf functions doesn't require decrementing
rsp.  In r255656, we introduced an optimization that would cheaply
materialize certain constants via push/pop.  Push decrements the stack
pointer and stores it's result at what is now the top of the stack.
However, this means that using push/pop would encroach on the red zone.
PR26023 gives an example where this corrupts an object in the red zone.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256808 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86InstrCompiler.td
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86InstrInfo.h
lib/Target/X86/X86InstrInfo.td
test/CodeGen/X86/materialize-one.ll [new file with mode: 0644]
test/CodeGen/X86/materialize.ll [deleted file]
test/CodeGen/X86/powi.ll