[PATCH] D82916: LIS: fix handleMove to properly extend main range
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 7 07:34:37 PDT 2020
rampitec added a comment.
In D82916#2135752 <https://reviews.llvm.org/D82916#2135752>, @vpykhtin wrote:
> Can you please add a LiveInterval dump (possibly truncated) for the test before and after each move to this review? It's a bit hard to follow what happens there.
Sure! This is the LIS at each step w/o this patch:
Before 1st move:
%1 [16r,32B:0)[32B,80r:4)[80r,80d:3)[96r,112r:1)[112r,160B:2) 0 at 16r 1 at 96r 2 at 112r 3 at 80r 4 at 32B-phi
L000000000000000C [16r,32B:0)[32B,64r:1) 0 at 16r 1 at 32B-phi
L00000000000000C0 [16r,16d:0) 0 at 16r
L0000000000000003 [16r,16d:1)[96r,96d:0) 0 at 96r 1 at 16r
L0000000000000030 [16r,32B:2)[32B,48r:3)[80r,80d:1)[112r,160B:0) 0 at 112r 1 at 80r 2 at 16r 3 at 32B-phi
weight:0.000000e+00
%2 [48r,80r:0) 0 at 48r weight:0.000000e+00
%3 [64r,64d:0) 0 at 64r weight:0.000000e+00
RegMasks:
********** MACHINEINSTRS **********
# Machine code for function func: NoPHIs
0B bb.0:
successors: %bb.1(0x80000000); %bb.1(100.00%)
16B %1:sgpr_128 = IMPLICIT_DEF
32B bb.1:
; predecessors: %bb.0, %bb.1
successors: %bb.1(0x40000000), %bb.2(0x40000000); %bb.1(50.00%), %bb.2(50.00%)
48B %2:sgpr_32 = COPY %1.sub2:sgpr_128
64B dead %3:sgpr_32 = COPY %1.sub1:sgpr_128
80B dead %1.sub2:sgpr_128 = COPY %2:sgpr_32
96B %1.sub0:sgpr_128 = IMPLICIT_DEF
112B %1.sub2:sgpr_128 = IMPLICIT_DEF
128B S_CBRANCH_SCC1 %bb.1, implicit undef $scc
144B S_BRANCH %bb.2
160B bb.2:
; predecessors: %bb.1
Before 2nd move (still correct):
%1 [16r,32B:0)[32B,80r:4)[80r,80d:3)[88r,96r:1)[96r,160B:2) 0 at 16r 1 at 88r 2 at 96r 3 at 80r 4 at 32B-phi
L000000000000000C [16r,32B:0)[32B,64r:1) 0 at 16r 1 at 32B-phi
L00000000000000C0 [16r,16d:0) 0 at 16r
L0000000000000003 [16r,16d:1)[96r,96d:0) 0 at 96r 1 at 16r
L0000000000000030 [16r,32B:2)[32B,48r:3)[80r,80d:1)[88r,160B:0) 0 at 88r 1 at 80r 2 at 16r 3 at 32B-phi
weight:0.000000e+00
%2 [48r,80r:0) 0 at 48r weight:0.000000e+00
%3 [64r,64d:0) 0 at 64r weight:0.000000e+00
RegMasks:
********** MACHINEINSTRS **********
# Machine code for function func: NoPHIs
0B bb.0:
successors: %bb.1(0x80000000); %bb.1(100.00%)
16B %1:sgpr_128 = IMPLICIT_DEF
32B bb.1:
; predecessors: %bb.0, %bb.1
successors: %bb.1(0x40000000), %bb.2(0x40000000); %bb.1(50.00%), %bb.2(50.00%)
48B %2:sgpr_32 = COPY %1.sub2:sgpr_128
64B dead %3:sgpr_32 = COPY %1.sub1:sgpr_128
80B dead %1.sub2:sgpr_128 = COPY %2:sgpr_32
88B %1.sub2:sgpr_128 = IMPLICIT_DEF
96B %1.sub0:sgpr_128 = IMPLICIT_DEF
128B S_CBRANCH_SCC1 %bb.1, implicit undef $scc
144B S_BRANCH %bb.2
160B bb.2:
; predecessors: %bb.1
After 2nd move from 64B to 92B, LIS is broken:
%1 [16r,32B:0)[32B,80r:4)[80r,80d:3)[88r,96r:1)[96r,160B:2) 0 at 16r 1 at 88r 2 at 96r 3 at 80r 4 at 32B-phi
L000000000000000C [16r,32B:0)[32B,92r:1) 0 at 16r 1 at 32B-phi
L00000000000000C0 [16r,16d:0) 0 at 16r
L0000000000000003 [16r,16d:1)[96r,96d:0) 0 at 96r 1 at 16r
L0000000000000030 [16r,32B:2)[32B,48r:3)[80r,80d:1)[88r,160B:0) 0 at 88r 1 at 80r 2 at 16r 3 at 32B-phi
weight:0.000000e+00
%2 [48r,80r:0) 0 at 48r weight:0.000000e+00
%3 [92r,92d:0) 0 at 92r weight:0.000000e+00
RegMasks:
********** MACHINEINSTRS **********
# Machine code for function func: NoPHIs
0B bb.0:
successors: %bb.1(0x80000000); %bb.1(100.00%)
16B %1:sgpr_128 = IMPLICIT_DEF
32B bb.1:
; predecessors: %bb.0, %bb.1
successors: %bb.1(0x40000000), %bb.2(0x40000000); %bb.1(50.00%), %bb.2(50.00%)
48B %2:sgpr_32 = COPY %1.sub2:sgpr_128
80B dead %1.sub2:sgpr_128 = COPY %2:sgpr_32
88B %1.sub2:sgpr_128 = IMPLICIT_DEF
92B dead %3:sgpr_32 = COPY %1.sub1:sgpr_128
96B %1.sub0:sgpr_128 = IMPLICIT_DEF
128B S_CBRANCH_SCC1 %bb.1, implicit undef $scc
144B S_BRANCH %bb.2
160B bb.2:
; predecessors: %bb.1
*** Bad machine code: A Subrange is not covered by the main range ***
- function: func
- interval: %1 [16r,32B:0)[32B,80r:4)[80r,80d:3)[88r,96r:1)[96r,160B:2) 0 at 16r 1 at 88r 2 at 96r 3 at 80r 4 at 32B-phi L000000000000000C [16r,32B:0)[32B,92r:1) 0 at 16r 1 at 32B-phi L00000000000000C0 [16r,16d:0) 0 at 16r L0000000000000003 [16r,16d:1)[96r,96d:0) 0 at 96r 1 at 16r L0000000000000030 [16r,32B:2)[32B,48r:3)[80r,80d:1)[88r,160B:0) 0 at 88r 1 at 80r 2 at 16r 3 at 32B-phi weight:0.000000e+00
LLVM ERROR: Found 1 machine code errors.
The difference after the patch which occurs after the 2nd move:
%1 [16r,32B:0)[32B,80r:4)[80r,88r:3)[88r,96r:2)[96r,160B:1) 0 at 16r 1 at 96r 2 at 88r 3 at 80r 4 at 32B-phi
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82916/new/
https://reviews.llvm.org/D82916
More information about the llvm-commits
mailing list