It turns out most of the thumb2 instructions are not allowed to touch SP. The semanti...
commit815c23a1ce10135b3158451b56c3ff469febbef3
authorEvan Cheng <evan.cheng@apple.com>
Fri, 7 Aug 2009 00:34:42 +0000 (7 00:34 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 7 Aug 2009 00:34:42 +0000 (7 00:34 +0000)
tree69ce77c93aa7b094dd2b99915d40c95b901df17a
parent6d2db66d10e6fb4fe5ad8ba579f7a5db8265dd7d
It turns out most of the thumb2 instructions are not allowed to touch SP. The semantics of such instructions are unpredictable. We have just been lucky that tests have been passing.

This patch takes pain to ensure all the PEI lowering code does the right thing when lowering frame indices, insert code to manipulate stack pointers, etc. It's also custom lowering dynamic stack alloc into pseudo instructions so we can insert the right instructions at scheduling time.

This fixes PR4659 and PR4682.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78361 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
lib/Target/ARM/ARMBaseInstrInfo.cpp
lib/Target/ARM/ARMBaseRegisterInfo.cpp
lib/Target/ARM/ARMISelDAGToDAG.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMISelLowering.h
lib/Target/ARM/ARMInstrThumb.td
lib/Target/ARM/ARMInstrThumb2.td
lib/Target/ARM/ARMLoadStoreOptimizer.cpp
lib/Target/ARM/README-Thumb2.txt
lib/Target/ARM/Thumb2InstrInfo.cpp
test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll [new file with mode: 0644]
test/CodeGen/Thumb2/large-stack.ll