Commit 425d1aa
[RISCV] Handle scalarized reductions in getArithmeticReductionCost
This fixes a crash reported at
#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.
(cherry picked from commit 053451c)1 parent 2d7ad98 commit 425d1aa
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 | |
|---|---|---|---|
| |||
1658 | 1658 | | |
1659 | 1659 | | |
1660 | 1660 | | |
1661 | | - | |
1662 | | - | |
1663 | | - | |
| 1661 | + | |
| 1662 | + | |
1664 | 1663 | | |
1665 | 1664 | | |
1666 | 1665 | | |
| |||
0 commit comments