Commit 862fb42
authored
[AMDGPU][GlobalISel] Fix G_UNMERGE_VALUES combine (#141812)
Fixes #139791.
When trying to combine two G_UNMERGE_VALUES with a COPY between them,
a crash occurs in tryCombineUnmergeValues() because getDefIndex() tries
to find the index of the original source register in the def found by
getDefIgnoringCopies(). In the case of a COPY in between, this register
is not present in the def, only in the COPY.1 parent 04691aa commit 862fb42
File tree
2 files changed
+26
-3
lines changed- llvm
- include/llvm/CodeGen/GlobalISel
- test/CodeGen/AMDGPU/GlobalISel
2 files changed
+26
-3
lines changedLines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1067 | 1067 | | |
1068 | 1068 | | |
1069 | 1069 | | |
1070 | | - | |
1071 | | - | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
1072 | 1073 | | |
| 1074 | + | |
1073 | 1075 | | |
1074 | 1076 | | |
1075 | 1077 | | |
1076 | | - | |
| 1078 | + | |
1077 | 1079 | | |
1078 | 1080 | | |
1079 | 1081 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1090 | 1090 | | |
1091 | 1091 | | |
1092 | 1092 | | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
0 commit comments