Fix crash. LLVM ERROR: Invalid size request on a scalable vector, which causing the crash on CodeMetrics:analyzeBasicBlock.
The cost model just reference D93639.
Paths
| Differential D126372
[RISCV]Add basic cost model for vector reduce for scalable vector AbandonedPublic Authored by liaolucy on May 25 2022, 5:36 AM.
Details Summary Fix crash. LLVM ERROR: Invalid size request on a scalable vector, which causing the crash on CodeMetrics:analyzeBasicBlock. The cost model just reference D93639.
Diff Detail
Unit TestsFailed
Event TimelineHerald added subscribers: llvm-commits, alextsao1999, • pcwang-thead and 2 others. · View Herald Transcript Comment Actions Can we test some illegal type here (e.g. vscale x 16 x i64). The patch includes logic for that so it may be worth having it.
Comment Actions
if(!isTypeLegal(VTy)) return BaseT::getArithmeticReductionCost(Opcode, VTy, FMF, CostKind);
Revision Contents
Diff 432488 llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
llvm/test/Analysis/CostModel/RISCV/scalable-reduce.ll
|
This doesn't seem very realistic (I assume these reductions must be done linearly) but I guess the cost here is measuring number of instructions required rather than latency, right?