[PATCH] D112598: [WIP][RISCV][CostModel] Add cost model for shuffle
Luke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 27 04:09:27 PDT 2021
luke957 added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:178
+ if (Kind == TTI::SK_Broadcast) {
+ return TLI->getTypeLegalizationCost(DL, Tp).first;
+ }
----------------
craig.topper wrote:
> Should this consider LMUL? The ALU likely needs more cycles for LMUL 2 than LMUL 1.
Em, I have not much knowledge in this area. Is ALU(as well as cache, pipeline) described in the RISCV spec? Or the design of ALU-like moduls is target independent?
================
Comment at: llvm/test/Analysis/CostModel/RISCV/shuffle-broadcast.ll:1
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
+; RUN: opt < %s -mtriple=riscv64--linux-gnu -mattr=+experimental-v,+f -cost-model -analyze | FileCheck %s
----------------
craig.topper wrote:
> Doesn’t this need -riscv-v-vector-bits-min?
Oh yes, I'll fix this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112598/new/
https://reviews.llvm.org/D112598
More information about the llvm-commits
mailing list