[all-commits] [llvm/llvm-project] ef7aad: [SystemZ] Improve handling of ZERO_EXTEND_VECTOR_I...

Jonas Paulsson via All-commits all-commits at lists.llvm.org
Tue Jun 30 00:09:44 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ef7aad0db49f0a3623b42af991ba4ae48099a58d
      https://github.com/llvm/llvm-project/commit/ef7aad0db49f0a3623b42af991ba4ae48099a58d
  Author: Jonas Paulsson <paulsson at linux.vnet.ibm.com>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
    M llvm/lib/Target/SystemZ/SystemZISelLowering.h
    M llvm/test/CodeGen/SystemZ/vec-move-16.ll
    M llvm/test/CodeGen/SystemZ/vec-move-23.ll
    A llvm/test/CodeGen/SystemZ/vec-move-24.ll
    M llvm/test/CodeGen/SystemZ/vec-zext.ll

  Log Message:
  -----------
  [SystemZ] Improve handling of ZERO_EXTEND_VECTOR_INREG.

Instead of doing multiple unpacks when zero extending vectors (e.g. v2i16 ->
v2i64), benchmarks have shown that it is better to do a VPERM (vector
permute) since that is only one sequential instruction on the critical path.

This patch achieves this by

1. Expand ZERO_EXTEND_VECTOR_INREG into a vector shuffle with a zero vector
   instead of (multiple) unpacks.

2. Improve SystemZ::GeneralShuffle to perform a single unpack as the last
   operation if Bytes matches it.

Review: Ulrich Weigand
Differential Revision: https://reviews.llvm.org/D78486




More information about the All-commits mailing list