[PATCH] D26066: [PowerPC] Improvements for BUILD_VECTOR Vol. 4

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 01:45:00 PDT 2016


nemanjai added a comment.

Here are some examples of terrible code gen currently (rather than providing code, I'm just illustrating these with pseudo-SDAG nodes):

  (build_vector (load $A), (load $B), (load $C) ...) -> performs each load even if they're consecutive, plus a load and vperm
  (build_vector (fptosi), (fptosi), ...) -> will perform a conversion, move from VSR, move to VSR for each, then it will swap and merge which involves a load and vperm
  (build_vector iNN:$A, iNN:$B, iNN:$C...) -> will do scalar_to_vector for each which involves an unnecessary swap on LE along with a load and vperm
  (build_vector iNN:$A, iNN:$A, ...) -> will do a scalar_to_vector which involves a swap on LE

and so on. All of these are improved to produce optimal code both on Power8 and Power9. The Power9 versions utilize the new instructions that make some of these more efficient.


Repository:
  rL LLVM

https://reviews.llvm.org/D26066





More information about the llvm-commits mailing list