[PATCH] D78486: [SystemZ] Expand vector zero-extend into a shuffle.

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 1 00:01:39 PDT 2020


jonpa added a comment.

> I'm wondering: unless I'm missing something, there's still one specific case where you generate a vperm followed by an unpack (the case where you already had a permute as source).   Wouldn't it be preferable to just use a single vperm there as well?

This is the case where the input is a permute that has no other users, which means that it's being replaced. So instead of vperm + vperm, we get a vperm + unpack, which follows the same reasoning of replacing a vperm with a single unpack.

For example, in the case with three source ops, where A and B first are combined with a permute, and now AB and C are to be combined: instead of permuting AB and C, the AB permute is changed so that AB and C can be unpacked.

This now happens 100 times on SPEC'17:

                                   patch  <>  "No permute replacement"
  vperm          :                23803                23903     +100
  vl             :               109720               109797      +77
  vuplhb         :                  151                  101      -50
  vuplhh         :                  177                  127      -50
  vst            :                85032                85078      +46
  larl           :               371586               371616      +30
  vgbm           :                11637                11644       +7
  mvi            :                23380                23381       +1


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78486/new/

https://reviews.llvm.org/D78486





More information about the llvm-commits mailing list