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
Details
- Reviewers
hfinkel lei jsji - Group Reviewers
Restricted Project - Commits
- rG7fbaa8097ecc: [PowerPC] Fix VSX clobbers of CSR registers
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
test/CodeGen/PowerPC/inline-asm-vsx-clobbers.ll | ||
---|---|---|
2 ↗ | (On Diff #223596) | Should we add -verify-machineinstrs to the test case? |
test/CodeGen/PowerPC/inline-asm-vsx-clobbers.ll | ||
---|---|---|
2 ↗ | (On Diff #223596) | Yup. We should. I'll add it on the next revision. |
Comment Actions
Thanks for your comments. I'll address them and commit this.
lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
14320 ↗ | (On Diff #223596) | 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 ↗ | (On Diff #223596) | Ha ha, good catch. That's just an errant option. I'll remove it on the commit. |