Commit 660ab72
Automerge: [RISCV] Cost casts with illegal types that can't be legalized (#153030)
If we have a floating point vector and no zve32f/zve64f/zve64d, we can
end up with an invalid type-legalization cost from
getTypeLegalizationCost.
Previously this triggered an assertion that the type must have been
legalized if the "legal" type is a vector, but in this case when it's
not possible to legalize the original type is spat back out.
This fixes it by just checking that the legalization cost is valid.
We don't have much testing for zve64x, so we may have other places in
the cost model with this issue.
Fixes #153008
(cherry picked from commit 81b576e)File tree
2 files changed
+2684
-1341
lines changed- llvm
- lib/Target/RISCV
- test/Analysis/CostModel/RISCV
2 files changed
+2684
-1341
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1567 | 1567 | | |
1568 | 1568 | | |
1569 | 1569 | | |
| 1570 | + | |
1570 | 1571 | | |
1571 | 1572 | | |
1572 | 1573 | | |
| |||
0 commit comments