[PATCH] D107651: [AArch64][SVE] Teach cost model that masked loads/stores are cheap
Bradley Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 6 08:48:20 PDT 2021
bsmith added reviewers: paulwalker-arm, peterwaller-arm.
bsmith added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1516
- return LT.first * 2;
+ return isa<ScalableVectorType>(Src) ? LT.first * 2 : LT.first * 2 + LT.first;
}
----------------
What's the rationale behind this cost for fixed types?
================
Comment at: llvm/test/Analysis/CostModel/AArch64/masked_ldst.ll:2
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
; RUN: opt < %s -cost-model -analyze -mtriple=aarch64-linux-gnu -mattr=+sve | FileCheck %s
----------------
This test is for scalable types, hence the changes in here are testing the cost of scalable masked loads/stores rather than fixed ones. You'll need to add functions (probably in another test file) that use the vscale_range attribute to specify various different fixed vector lengths)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107651/new/
https://reviews.llvm.org/D107651
More information about the llvm-commits
mailing list