[all-commits] [llvm/llvm-project] f7a7ef: [AMDGPU] Tweak getTypeLegalizationCost()

Stanislav Mekhanoshin via All-commits all-commits at lists.llvm.org
Mon Jul 6 14:08:09 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f7a7efbf88b72b4aa6bd95a1ded6dacd2237f2f8
      https://github.com/llvm/llvm-project/commit/f7a7efbf88b72b4aa6bd95a1ded6dacd2237f2f8
  Author: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
  Date:   2020-07-06 (Mon, 06 Jul 2020)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.h
    M llvm/test/Analysis/CostModel/AMDGPU/add-sub.ll
    M llvm/test/Analysis/CostModel/AMDGPU/mul.ll

  Log Message:
  -----------
  [AMDGPU] Tweak getTypeLegalizationCost()

Even though wide vectors are legal they still cost more as we
will have to eventually split them. Not all operations can
be uniformly done on vector types.

Conservatively add the cost of splitting at least to 8 dwords,
which is our widest possible load.

We are more or less lying to cost mode with this change but
this can prevent vectorizer from creation of wide vectors which
results in RA problems for us.

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




More information about the All-commits mailing list