This patch implements store, load, move from and to registers related
builtins. The patch aims to provide feature parady with xlC on AIX.
Details
- Reviewers
nemanjai - Group Reviewers
Restricted Project - Commits
- rG3434ac9e3902: [PowerPC] Store, load, move from and to registers related builtins
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
please add sema checking for pwr8 builtins.
| llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-LoadReserve-StoreCond.ll | ||
|---|---|---|
| 80 | remove all reference to attributes, local_unnamed_addr #[0..9] since it's not in the IR. | |
We have encountered an issue with lwarx/ldarx that required that they emit inline asm rather than an intrinsic. What makes lbarx/lharx different?
| clang/lib/Sema/SemaChecking.cpp | ||
|---|---|---|
| 3406 | Why do these need the extdiv feature? | |
| llvm/include/llvm/IR/IntrinsicsPowerPC.td | ||
|---|---|---|
| 1686–1706 | nit: un-related line deletion | |
| llvm/lib/Target/PowerPC/PPCInstrInfo.td | ||
| 5493 | EXTSH should not be needed and we should not be using xoaddr | |
| llvm/test/CodeGen/builtins-ppc-xlcompat-move-tofrom-regs.ll | ||
| 8 | this is confusing... maybe this shouldjust be CHECK-32BIT | |
Taking this off the review queue until lharx/lbarx are changed to emit inline asm in line with lwarx/ldarx.
This is getting close to approval. The newly added __stfiw needs to be fixed and some nits need to be addressed.
| clang/lib/Sema/SemaChecking.cpp | ||
|---|---|---|
| 3405 | This is not correct. The instruction (non-VSX version) has existed since Power3. The VSX version was added in Power8. No changes to the instruction came in Power9 so I have no idea where the decision to add this check came from. In fact, this would also blow up in the back end if you compiled with something like -mcpu=pwr9 -mno-altivec or -mcpu=pwr9 -mno-vsx. | |
| llvm/include/llvm/IR/IntrinsicsPowerPC.td | ||
| 1567 | Nit: line too long. | |
| 1576 | Nit: indentation is inconsistent here. | |
| llvm/lib/Target/PowerPC/PPCInstrVSX.td | ||
| 4085 | This needs the non-VSX pattern as well. | |
| llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-stfiw.ll | ||
| 2 | One of the run lines should be with -mattr=-vsx. | |
Addressed comments
| clang/test/CodeGen/builtins-ppc-xlcompat-LoadReseve-StoreCond.c | ||
|---|---|---|
| 16 | lwarx and stwcx are both available before power8, so the check is not needed. | |
issue should be fixed now; pushed with this: https://reviews.llvm.org/D106130#change-PZi4uueeCg9i
(I just had to move the test files into the PowerPC folder).
Will continue to monitor
@jroelofs committed f6769b663a0d4432b5e00e0c03904a5dfba7b077 to move the backend test cases from CodeGen -> CodeGen/PowerPC so they don't fail when the PPC backend isn't built.
This is not correct. The instruction (non-VSX version) has existed since Power3. The VSX version was added in Power8. No changes to the instruction came in Power9 so I have no idea where the decision to add this check came from.
In fact, this would also blow up in the back end if you compiled with something like -mcpu=pwr9 -mno-altivec or -mcpu=pwr9 -mno-vsx.