forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm][CodeGen] Fix the issue caused by live interval checking in win…
…dow scheduler (llvm#123184) At some corner cases, the cloned MI still retains an old slot index, which leads to the compiler crashing. This patch update the slot index map before delete the recycled MI. llvm#123165
- Loading branch information
Showing
8 changed files
with
99 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
llvm/test/CodeGen/Hexagon/swp-ws-live-intervals-issue123165.mir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5 | ||
# RUN: llc --mtriple=hexagon %s -run-pass=pipeliner -o -| FileCheck %s | ||
|
||
... | ||
--- | ||
name: test_swp_ws_live_intervals | ||
tracksRegLiveness: true | ||
body: | | ||
; CHECK-LABEL: name: test_swp_ws_live_intervals | ||
; CHECK: bb.0: | ||
; CHECK-NEXT: successors: %bb.1(0x80000000) | ||
; CHECK-NEXT: liveins: $r0 | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: [[COPY:%[0-9]+]]:intregs = COPY $r0 | ||
; CHECK-NEXT: J2_loop0i %bb.1, 1, implicit-def $lc0, implicit-def $sa0, implicit-def $usr | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: bb.1: | ||
; CHECK-NEXT: successors: %bb.2(0x04000000), %bb.1(0x7c000000) | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: [[L2_loadri_io:%[0-9]+]]:intregs = L2_loadri_io [[COPY]], 0 | ||
; CHECK-NEXT: [[L2_loadrub_io:%[0-9]+]]:intregs = L2_loadrub_io [[L2_loadri_io]], 0 | ||
; CHECK-NEXT: [[PS_loadriabs:%[0-9]+]]:intregs = PS_loadriabs 0 | ||
; CHECK-NEXT: S2_storerb_io [[PS_loadriabs]], 0, [[L2_loadrub_io]] | ||
; CHECK-NEXT: ENDLOOP0 %bb.1, implicit-def $pc, implicit-def $lc0, implicit $sa0, implicit $lc0 | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: bb.2: | ||
; CHECK-NEXT: successors: %bb.5(0x80000000) | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: [[A2_tfrsi:%[0-9]+]]:intregs = A2_tfrsi 0 | ||
; CHECK-NEXT: [[A2_tfrsi1:%[0-9]+]]:intregs = A2_tfrsi -1 | ||
; CHECK-NEXT: J2_jump %bb.5, implicit-def $pc | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: bb.3: | ||
; CHECK-NEXT: S2_storeri_io [[COPY]], 0, %18 | ||
; CHECK-NEXT: PS_jmpret $r31, implicit-def dead $pc | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: bb.5: | ||
; CHECK-NEXT: successors: %bb.7(0x80000000) | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: [[A2_addi:%[0-9]+]]:intregs = A2_addi [[A2_tfrsi1]], 1 | ||
; CHECK-NEXT: J2_jump %bb.7, implicit-def $pc | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: bb.7: | ||
; CHECK-NEXT: successors: %bb.3(0x80000000) | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: [[PHI:%[0-9]+]]:intregs = PHI [[A2_tfrsi]], %bb.5 | ||
; CHECK-NEXT: J2_jump %bb.3, implicit-def $pc | ||
bb.0: | ||
successors: %bb.1(0x80000000) | ||
liveins: $r0 | ||
|
||
%0:intregs = COPY $r0 | ||
J2_loop0i %bb.1, 1, implicit-def $lc0, implicit-def $sa0, implicit-def $usr | ||
|
||
bb.1: | ||
successors: %bb.2(0x04000000), %bb.1(0x7c000000) | ||
|
||
%1:intregs = L2_loadri_io %0, 0 | ||
%2:intregs = L2_loadrub_io killed %1, 0 | ||
%3:intregs = PS_loadriabs 0 | ||
S2_storerb_io killed %3, 0, killed %2 | ||
ENDLOOP0 %bb.1, implicit-def $pc, implicit-def $lc0, implicit $sa0, implicit $lc0 | ||
|
||
bb.2: | ||
successors: %bb.4(0x80000000) | ||
|
||
%4:intregs = A2_tfrsi 0 | ||
%5:intregs = A2_tfrsi -1 | ||
J2_loop0i %bb.4, 1, implicit-def $lc0, implicit-def $sa0, implicit-def $usr | ||
J2_jump %bb.4, implicit-def $pc | ||
|
||
bb.3: | ||
S2_storeri_io %0, 0, %6 | ||
PS_jmpret $r31, implicit-def dead $pc | ||
|
||
bb.4: | ||
successors: %bb.3(0x04000000), %bb.4(0x7c000000) | ||
|
||
%7:intregs = PHI %5, %bb.2, %8, %bb.4 | ||
%6:intregs = PHI %4, %bb.2, %9, %bb.4 | ||
%8:intregs = A2_addi %7, 1 | ||
%9:intregs = S2_setbit_i %8, 0 | ||
ENDLOOP0 %bb.4, implicit-def $pc, implicit-def $lc0, implicit $sa0, implicit $lc0 | ||
J2_jump %bb.3, implicit-def $pc | ||
|
||
... |