[all-commits] [llvm/llvm-project] b4f04d: [VectorCombine][SVE] Do not fold bitcast shuffle f...

huihzhang via All-commits all-commits at lists.llvm.org
Wed Sep 2 15:02:40 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b4f04d7135078dd22abbcedbabd3bd67ccb037d7
      https://github.com/llvm/llvm-project/commit/b4f04d7135078dd22abbcedbabd3bd67ccb037d7
  Author: Huihui Zhang <huihuiz at quicinc.com>
  Date:   2020-09-02 (Wed, 02 Sep 2020)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    A llvm/test/Transforms/VectorCombine/AArch64/lit.local.cfg
    A llvm/test/Transforms/VectorCombine/AArch64/vscale-bitcast-shuffle.ll

  Log Message:
  -----------
  [VectorCombine][SVE] Do not fold bitcast shuffle for scalable type.

First, shuffle cost for scalable type is not known for scalable type;
Second, we cannot reason if the narrowed shuffle mask for scalable type
is a splat or not.

E.g., Bitcast splat vector from type <vscale x 4 x i32> to <vscale x 8 x i16>
will involve narrowing shuffle mask <vscale x 4 x i32> zeroinitializer to
<vscale x 8 x i32> with element sequence of <0, 1, 0, 1, ...>, which cannot be
reasoned if it's a valid splat or not.

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D86995




More information about the All-commits mailing list