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.
Details
- Reviewers
hfinkel lei jsji - Group Reviewers
Restricted Project - Commits
- rG7fbaa8097ecc: [PowerPC] Fix VSX clobbers of CSR registers
Diff Detail
- Repository
- rL LLVM
Event Timeline
test/CodeGen/PowerPC/inline-asm-vsx-clobbers.ll | ||
---|---|---|
2 | Should we add -verify-machineinstrs to the test case? |
test/CodeGen/PowerPC/inline-asm-vsx-clobbers.ll | ||
---|---|---|
2 | Yup. We should. I'll add it on the next revision. |
Thanks for your comments. I'll address them and commit this.
lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
14320 | I believe you mean VSSRC/VSFRC (i.e. the scalar VSX registers). I believe those have to be named as f<N> or vs<N> in the clobbers list so we should still handle them correctly. | |
test/CodeGen/PowerPC/inline-asm-vsx-clobbers.ll | ||
3 | Ha ha, good catch. That's just an errant option. I'll remove it on the commit. |
Do we need to consider 32 or 64 bits regclass here? If not, maybe we should add some comments to explain?