[PATCH] D38486: [PPC] Implement the heuristic to choose between a X-Form VSX ld/st vs a X-Form FP ld/st.
Nemanja Ivanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 6 01:32:43 PDT 2017
nemanjai added inline comments.
================
Comment at: lib/Target/PowerPC/PPCInstrInfo.cpp:2080
+ }
+ unsigned TargetReg = MI.getOperand(0).getReg();
+ unsigned Opcode;
----------------
Minor nit: everything you've added below here is just a duplication of how we handle the D-Forms above. Why not just unify the two - after all, the approach is identical:
- Identify the upper and lower opcodes
- Change the opcode of the instruction accordingly
================
Comment at: lib/Target/PowerPC/PPCInstrVSX.td:3089
- let Predicates = [HasVSX, NoP9Vector] in {
+ let Predicates = [HasVSX/*, NoP9Vector*/] in {
// Load-and-splat with fp-to-int conversion (using X-Form VSX loads).
----------------
hfinkel wrote:
> jtony wrote:
> > Do we really need the NoP9Vector here ? If not, I can remove it.
> If we don't have it, won't this pattern compete with the DblToIntLoadP9 pattern on the `P9`?Maybe the complexity metric will make the latter win, but it probably makes sense to leave the NoP9Vector here so that it's explicit.
>
> Otherwise, this LGTM.
>
I agree with Hal here. Please leave this in, the fact that there is no observable change in behaviour may be just luck for some of the patterns (i.e. if `Complexity` and `CodeSize` are equal).
Plus this makes it very nice and clear when looking at the code that we mean to use these on P7 and P8 targets.
https://reviews.llvm.org/D38486
More information about the llvm-commits
mailing list