[all-commits] [llvm/llvm-project] 5c94fa: [TTI] [AArch64] getMemoryOpCost for ptr types

sjoerdmeijer via All-commits all-commits at lists.llvm.org
Fri Dec 16 07:38:41 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c94faba0bba628aaa5c1f034ef04acd40f7adb2
      https://github.com/llvm/llvm-project/commit/5c94faba0bba628aaa5c1f034ef04acd40f7adb2
  Author: Sjoerd Meijer <smeijer at nvidia.com>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/AArch64/store-ptr.ll
    M llvm/test/Transforms/SLPVectorizer/AArch64/store-ptr.ll

  Log Message:
  -----------
  [TTI] [AArch64] getMemoryOpCost for ptr types

Opaque ptr types have a size in bits of 0. The legalised type is an i64 or
vector of i64s, which do have a size. Because of this difference in size, target
hook getMemoryOpCost modelled stores of ptr types as extending/truncating
load/stores. Now we just check for opaque ptr types and return the legalised
cost. This makes stores of pointers cheaper, and as a result we now SLP
vectorise the changed test case.

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




More information about the All-commits mailing list