PPC: Ignore spill/restore requests for VRSAVE (except on Darwin)
authorHal Finkel <hfinkel@anl.gov>
Fri, 28 Jun 2013 22:29:56 +0000 (22:29 +0000)
committerHal Finkel <hfinkel@anl.gov>
Fri, 28 Jun 2013 22:29:56 +0000 (22:29 +0000)
commit6a636a813f33b46b3271ec8517ee1936a0c92c9f
treef078b88b5ee78841a73cdebea3334d6ad9e1e14d
parent8bb9ec15c89da88c8e223f334296d81080cd829c
PPC: Ignore spill/restore requests for VRSAVE (except on Darwin)

This fixes PR16418, which reports that a function calling
__builtin_unwind_init() asserts. The cause is that this generates a
spill/restore for VRSAVE, and we support that only on Darwin (because VRSAVE is
only really used on Darwin).

The test case checks only that we don't crash. We can add correctness checks
once someone verifies what behavior the function is supposed to have.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185235 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCFrameLowering.cpp
test/CodeGen/PowerPC/unwind-dw2.ll [new file with mode: 0644]