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
Unit Tests
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 | ||
---|---|---|
3370 | Why do these need the extdiv feature? |
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 | ||
---|---|---|
3369 | 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 | ||
1568 | Nit: line too long. | |
1577 | Nit: indentation is inconsistent here. | |
llvm/lib/Target/PowerPC/PPCInstrVSX.td | ||
4072 ↗ | (On Diff #359259) | This needs the non-VSX pattern as well. |
llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-stfiw.ll | ||
1 ↗ | (On Diff #359259) | One of the run lines should be with -mattr=-vsx. |
Addressed comments
clang/test/CodeGen/builtins-ppc-xlcompat-LoadReseve-StoreCond.c | ||
---|---|---|
15 | 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.