This patch is to fix the xxperm vector operand swap condition so that the
single-use operand is in V2 to prevent copying, it also fixes the subtarget
condition to exploit the xpperm.
Details
- Reviewers
nemanjai stefanp - Commits
- rGcf0395f81655: [PowerPC] Fix the xxperm swap requirements
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I realize that a lot of test cases have changed but it would be good to add the test case that is specific to this opportunity where the copy is removed.
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
10237–10240 | nit: Also, this comment needs to do a better job explaining why we want to avoid having the input with multiple uses as the second input to XXPERM. ie. That we have one input that is also an output for XXPERM and so that input must be clobbered. | |
llvm/test/CodeGen/PowerPC/pre-inc-disable.ll | ||
140 | Here we are replacing lfiwzx with lxsiwzx. | |
182 | Here it is the same idea as above. We are replacing a 4 cycle with a 5 cycle. |
I have only one nit and that can be fixed on commit.
Otherwise LGTM.
llvm/test/CodeGen/PowerPC/xxperm-swap.ll | ||
---|---|---|
97 | nit: |
llvm/test/CodeGen/PowerPC/xxperm-swap.ll | ||
---|---|---|
2 | Nit: it appears that the checks were produced bu update_llc_test_checks.py yet the comment saying so at the top of the file is not present (removed?). If you're using it to produce the checks, please leave it in place as it signals to future maintainers that it is safe to use it to update the test if needed. | |
97 | +1 |
The patch is causing bot failures which did not show up at the time of posting this:
https://lab.llvm.org/buildbot/#/builders/16/builds/46086/steps/6/logs/FAIL__LLVM__pr61315_ll
TEST 'LLVM :: CodeGen/PowerPC/pr61315.ll' FAILED
I will post another patch to update that test accordingly.
nit:
Too many // .
Also, this comment needs to do a better job explaining why we want to avoid having the input with multiple uses as the second input to XXPERM. ie. That we have one input that is also an output for XXPERM and so that input must be clobbered.