Don't setCalleeSavedInfoValid() until spills are interted.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 15 Aug 2009 13:10:46 +0000 (13:10 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 15 Aug 2009 13:10:46 +0000 (13:10 +0000)
commitd62c9a697b53f9e754926a89126fd121220ed09b
tree1d8487daca8b7c6fc4da44210cb233853a89824e
parent4af85b2328d432960371efeb092a70a8d9c25227
Don't setCalleeSavedInfoValid() until spills are interted.

In a naked function, the flag is never set and getPristineRegs() returns an
empty list. That means naked functions are able to clobber callee saved
registers, but that is the whole point of naked functions.

This fixes PR4716.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79096 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/PrologEpilogInserter.cpp
test/CodeGen/ARM/2009-08-15-RegScavengerAssert.ll [new file with mode: 0644]