Commit 5153f99
MachineCopyPropagation: Do not remove copies preserved by regmask (llvm#125868)
llvm/llvm-project@9e436c2daa44 tries to handle register masks and
sub-registers, it avoids clobbering RegUnit presreved by regmask. But it
then introduces invalid pointer issues.
We delete the copies without invalidate all the use in the CopyInfo, so
we dereferenced invalid pointers in next interation, causing asserts.
Fixes: llvm#126107
---------
Co-authored-by: Matt Arsenault <[email protected]>1 parent f2bb875 commit 5153f99
File tree
2 files changed
+33
-4
lines changed- llvm
- lib/CodeGen
- test/CodeGen/MIR/X86
2 files changed
+33
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1018 | 1018 | | |
1019 | 1019 | | |
1020 | 1020 | | |
1021 | | - | |
1022 | | - | |
1023 | | - | |
1024 | 1021 | | |
1025 | 1022 | | |
1026 | | - | |
| 1023 | + | |
| 1024 | + | |
1027 | 1025 | | |
1028 | 1026 | | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
1029 | 1033 | | |
1030 | 1034 | | |
1031 | 1035 | | |
1032 | 1036 | | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
1033 | 1045 | | |
1034 | 1046 | | |
1035 | 1047 | | |
| |||
| 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 | + | |
0 commit comments