Commit a668846
authored
[DAGCombiner] Handle extending EXTRACT_VECTOR_ELTs in calculateByteProvider (#83963)
An EXTRACT_VECTOR_ELT can extend the element to the width of its result
type, leaving the high bits undefined. Previously if we attempted to
query the bytes in these high bits we would recurse and hit an
assertion. This fixes it by bailing if the index is outside of the
vector element size.
I think the assertion Index < ByteWidth may still be incorrect, since
ByteWidth is calculated from Op.getValueSizeInBits(). I believe this
should be Op.getScalarValueSizeInBits() whenever VectorIndex is set
since we're querying the element now, not the vector. But I couldn't
think of a test case to trigger it. It can be addressed in a follow-up
patch.
Fixes #839201 parent b585c43 commit a668846
File tree
2 files changed
+20
-0
lines changed- llvm
- lib/CodeGen/SelectionDAG
- test/CodeGen/RISCV/rvv
2 files changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8627 | 8627 | | |
8628 | 8628 | | |
8629 | 8629 | | |
| 8630 | + | |
| 8631 | + | |
| 8632 | + | |
| 8633 | + | |
8630 | 8634 | | |
8631 | 8635 | | |
8632 | 8636 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments