Commit 7b901c5
committed
[AArch64][SVE] Fix hang when in VECTOR_HISTOGRAM DAG combine
The histogram DAG combine went into an infinite loop of creating the
same histogram node due to an incorrect use of the `refineUniformBase`
and `refineIndexType` APIs.
These APIs take SDValues by reference (SDValue&) and return `true` if
they were "refined" (i.e., set them to new values).
Previously, this DAG combine would create the `Ops` array (used to
create the new histogram node) before calling the `refine*` APIs, which
copies the SDValues into the array, meaning the updated values were not
used to create the new histogram node.
Reproducer: https://godbolt.org/z/hsGWhTaqY (it will timeout)1 parent fac7453 commit 7b901c5
File tree
2 files changed
+76
-7
lines changed- llvm
- lib/CodeGen/SelectionDAG
- test/CodeGen/AArch64
2 files changed
+76
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12843 | 12843 | | |
12844 | 12844 | | |
12845 | 12845 | | |
| 12846 | + | |
12846 | 12847 | | |
12847 | 12848 | | |
12848 | 12849 | | |
12849 | 12850 | | |
12850 | 12851 | | |
12851 | 12852 | | |
12852 | | - | |
12853 | | - | |
12854 | | - | |
| 12853 | + | |
| 12854 | + | |
| 12855 | + | |
| 12856 | + | |
12855 | 12857 | | |
12856 | 12858 | | |
| 12859 | + | |
12857 | 12860 | | |
12858 | | - | |
12859 | | - | |
12860 | | - | |
12861 | | - | |
12862 | 12861 | | |
12863 | 12862 | | |
12864 | 12863 | | |
| |||
Lines changed: 70 additions & 0 deletions
| 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 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
0 commit comments