[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 09:41:27 PDT 2021
bsmith added inline comments.
================
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
----------------
paulwalker-arm wrote:
> MattDevereau wrote:
> > bsmith wrote:
> > > 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)
> > What is the difference between this test called "fixed" and the test called "scalable" further down then?
> @bsmith Can this not be done using multiple RUN lines instead? I'm hoping that a single set of CHECK lines can be used by utilising FileChecks math functions.
That's probably a better approach yes, to avoid duplicating things.
================
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
----------------
bsmith wrote:
> paulwalker-arm wrote:
> > MattDevereau wrote:
> > > bsmith wrote:
> > > > 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)
> > > What is the difference between this test called "fixed" and the test called "scalable" further down then?
> > @bsmith Can this not be done using multiple RUN lines instead? I'm hoping that a single set of CHECK lines can be used by utilising FileChecks math functions.
> That's probably a better approach yes, to avoid duplicating things.
The 'fixed' test is testing the fixed LLVM IR types when using scalable codegen (i.e. fixed types are treated as Neon types, not SVE), the 'scalable' test is testing scalable types using scalable codegen. You need a test that checks fixed types using fixed codegen (of various sizes).
That is to say, as per Paul's approach, you need some additional run lines that specify `-aarch64-sve-vector-bits-min=<value>`, which result in different costs for the the masked load/stores depending on the value of `<value>`
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