Future cpu instructions dmxxinstdmr512 and dmxxextfdmr512 insert and extract
quad vectors from the new wide accumulator(wacc) register class.
The introduction of these new instructions renders the p10 instructions
xxmtacc and xxmfacc obsolete since the new wacc register class is a better
choice for handing quad vector operations. This patch ensures that, for
future cpu, instructions dmxxinstdmr512 and dmxxextfdmr512 are generated
by custom lowering the intrinsics for xxm[t|f]acc to produce no instructions.
Details
- Reviewers
stefanp nemanjai amyk lei - Group Reviewers
Restricted Project - Commits
- rG62c1cf7c63f0: [PowerPC][Future] Enable __builtin_mma_xxm[t|f]acc
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The SelectionDAG object may have an easier way for you do to what you are trying to do here. I've added a comment. If you use the selection DAG my nit will probably just disappear.
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
10759 | There is an easier way to do this. DAG.ReplaceAllUsesWith(From, To); | |
10762 | nit: |
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
10746–10756 | I find it confusing to start talking about new instructions when the block starts with the p10 intrinsics. I would add this comment to after handling of non-future ISA code. So after the if stmt and simplify it a bit as well. | |
llvm/test/CodeGen/PowerPC/mmaplus-intrinsics.ll | ||
152 | I realized these -O0 run line was not added as part of this patch, but I am wondering why we need to be explicitly running -O0 for these intrinsic tests. Are they generated differently for -O0 vs opt? |
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
10746–10747 | nit: |
llvm/test/CodeGen/PowerPC/mmaplus-intrinsics.ll | ||
---|---|---|
152 | I think the reason for adding O0 test cases was to make sure that FastISEL worked in these tested situations. For this patch specifically the xxm[t|f]acc intrinsics are not removed differently at O0, but having the check to make sure the the quad vector type is lowered to the expected dmr moves as a result of the intrinsic removal makes sense to me. Even then, the amount of new O0 checks just for this change could be considered overkill. Here I am adding a few new test cases but also moving some from some from mma-instrinsics.ll so i could move those new test to their own file where I do not need to test fastISEL, but I did not see a strong reasoning to do so at the time. |
nit: