[PowerPC] Fix VSX clobbers of CSR registers
authorNemanja Ivanovic <nemanjai@ca.ibm.com>
Mon, 25 Nov 2019 15:32:28 +0000 (09:32 -0600)
committerNemanja Ivanovic <nemanjai@ca.ibm.com>
Mon, 25 Nov 2019 17:41:34 +0000 (11:41 -0600)
commit7fbaa8097ecc4309fec49db14fadac731ce53079
treef4ca18f5e419994788a996906120fb4c4f591ef5
parente85d2e4981b9db98798ce3e15078775eb50be854
[PowerPC] Fix VSX clobbers of CSR registers

If an inline asm statement clobbers a VSX register that overlaps with a
callee-saved Altivec register or FPR, we will not record the clobber and will
therefore violate the ABI. This is clearly a bug so this patch fixes it.

Differential revision: https://reviews.llvm.org/D68576
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/CSR-fit.ll
llvm/test/CodeGen/PowerPC/inline-asm-vsx-clobbers.ll [new file with mode: 0644]