Commit 053451c
committed
[RISCV] Handle scalarized reductions in getArithmeticReductionCost
This fixes a crash reported at
llvm#114250 (comment)
If the vector type isn't legal at all, e.g. bfloat with +zvfbfmin,
then the legalized type will be scalarized. So use getScalarType()
instead of getVectorElement() when checking for f16/bf16.1 parent 4853bf0 commit 053451c
File tree
2 files changed
+137
-35
lines changed- llvm
- lib/Target/RISCV
- test/Analysis/CostModel/RISCV
2 files changed
+137
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1874 | 1874 | | |
1875 | 1875 | | |
1876 | 1876 | | |
1877 | | - | |
1878 | | - | |
1879 | | - | |
| 1877 | + | |
| 1878 | + | |
1880 | 1879 | | |
1881 | 1880 | | |
1882 | 1881 | | |
| |||
0 commit comments