|
45 | 45 | define amdgpu_kernel void @copy_agpr_to_agpr_tuple() #0 { ret void }
|
46 | 46 | define amdgpu_kernel void @copy_agpr_to_agpr_tuple_kill() #0 { ret void }
|
47 | 47 |
|
| 48 | + define amdgpu_kernel void @look_for_vgpr_killed() #0 { ret void } |
| 49 | + define amdgpu_kernel void @look_for_vgpr_killed_tuple() #0 { ret void } |
| 50 | + |
48 | 51 | attributes #0 = { "amdgpu-flat-work-group-size"="1,256" }
|
49 | 52 | ...
|
50 | 53 |
|
@@ -1517,3 +1520,83 @@ body: |
|
1517 | 1520 | renamable $agpr4_agpr5_agpr6_agpr7 = COPY renamable killed $agpr0_agpr1_agpr2_agpr3, implicit $exec
|
1518 | 1521 | S_ENDPGM 0, implicit $agpr4_agpr5_agpr6_agpr7
|
1519 | 1522 | ...
|
| 1523 | + |
| 1524 | +# Make sure the expansion of the a-to-a copy doesn't introduce a use |
| 1525 | +# after kill of the source vgpr |
| 1526 | +--- |
| 1527 | +name: look_for_vgpr_killed |
| 1528 | +tracksRegLiveness: true |
| 1529 | +body: | |
| 1530 | + bb.0: |
| 1531 | + liveins: $agpr0 |
| 1532 | +
|
| 1533 | + ; GFX908-LABEL: name: look_for_vgpr_killed |
| 1534 | + ; GFX908: liveins: $agpr0 |
| 1535 | + ; GFX908-NEXT: {{ $}} |
| 1536 | + ; GFX908-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec |
| 1537 | + ; GFX908-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 $vgpr0, implicit $exec |
| 1538 | + ; GFX908-NEXT: S_NOP 0, implicit $vgpr0 |
| 1539 | + ; GFX908-NEXT: $agpr1 = V_ACCVGPR_WRITE_B32_e64 $vgpr0, implicit $exec |
| 1540 | + ; |
| 1541 | + ; GFX90A-LABEL: name: look_for_vgpr_killed |
| 1542 | + ; GFX90A: liveins: $agpr0 |
| 1543 | + ; GFX90A-NEXT: {{ $}} |
| 1544 | + ; GFX90A-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec |
| 1545 | + ; GFX90A-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 $vgpr0, implicit $exec |
| 1546 | + ; GFX90A-NEXT: S_NOP 0, implicit killed $vgpr0 |
| 1547 | + ; GFX90A-NEXT: $agpr1 = V_ACCVGPR_MOV_B32 $agpr0, implicit $exec |
| 1548 | + ; |
| 1549 | + ; GFX942-LABEL: name: look_for_vgpr_killed |
| 1550 | + ; GFX942: liveins: $agpr0 |
| 1551 | + ; GFX942-NEXT: {{ $}} |
| 1552 | + ; GFX942-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec |
| 1553 | + ; GFX942-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 $vgpr0, implicit $exec |
| 1554 | + ; GFX942-NEXT: S_NOP 0, implicit killed $vgpr0 |
| 1555 | + ; GFX942-NEXT: $agpr1 = V_ACCVGPR_MOV_B32 $agpr0, implicit $exec |
| 1556 | + $vgpr0 = V_MOV_B32_e32 0, implicit $exec |
| 1557 | + $agpr0 = COPY $vgpr0 |
| 1558 | + S_NOP 0, implicit killed $vgpr0 |
| 1559 | + $agpr1 = COPY $agpr0 |
| 1560 | +
|
| 1561 | +... |
| 1562 | + |
| 1563 | +--- |
| 1564 | +name: look_for_vgpr_killed_tuple |
| 1565 | +tracksRegLiveness: true |
| 1566 | +body: | |
| 1567 | + bb.0: |
| 1568 | + liveins: $agpr0 |
| 1569 | +
|
| 1570 | + ; GFX908-LABEL: name: look_for_vgpr_killed_tuple |
| 1571 | + ; GFX908: liveins: $agpr0 |
| 1572 | + ; GFX908-NEXT: {{ $}} |
| 1573 | + ; GFX908-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec, implicit-def $vgpr0_vgpr1 |
| 1574 | + ; GFX908-NEXT: $vgpr1 = V_MOV_B32_e32 1, implicit $exec |
| 1575 | + ; GFX908-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 $vgpr0, implicit $exec |
| 1576 | + ; GFX908-NEXT: S_NOP 0, implicit $vgpr0_vgpr1 |
| 1577 | + ; GFX908-NEXT: $agpr1 = V_ACCVGPR_WRITE_B32_e64 $vgpr0, implicit $exec |
| 1578 | + ; |
| 1579 | + ; GFX90A-LABEL: name: look_for_vgpr_killed_tuple |
| 1580 | + ; GFX90A: liveins: $agpr0 |
| 1581 | + ; GFX90A-NEXT: {{ $}} |
| 1582 | + ; GFX90A-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec, implicit-def $vgpr0_vgpr1 |
| 1583 | + ; GFX90A-NEXT: $vgpr1 = V_MOV_B32_e32 1, implicit $exec |
| 1584 | + ; GFX90A-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 $vgpr0, implicit $exec |
| 1585 | + ; GFX90A-NEXT: S_NOP 0, implicit killed $vgpr0_vgpr1 |
| 1586 | + ; GFX90A-NEXT: $agpr1 = V_ACCVGPR_MOV_B32 $agpr0, implicit $exec |
| 1587 | + ; |
| 1588 | + ; GFX942-LABEL: name: look_for_vgpr_killed_tuple |
| 1589 | + ; GFX942: liveins: $agpr0 |
| 1590 | + ; GFX942-NEXT: {{ $}} |
| 1591 | + ; GFX942-NEXT: $vgpr0 = V_MOV_B32_e32 0, implicit $exec, implicit-def $vgpr0_vgpr1 |
| 1592 | + ; GFX942-NEXT: $vgpr1 = V_MOV_B32_e32 1, implicit $exec |
| 1593 | + ; GFX942-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 $vgpr0, implicit $exec |
| 1594 | + ; GFX942-NEXT: S_NOP 0, implicit killed $vgpr0_vgpr1 |
| 1595 | + ; GFX942-NEXT: $agpr1 = V_ACCVGPR_MOV_B32 $agpr0, implicit $exec |
| 1596 | + $vgpr0 = V_MOV_B32_e32 0, implicit $exec, implicit-def $vgpr0_vgpr1 |
| 1597 | + $vgpr1 = V_MOV_B32_e32 1, implicit $exec |
| 1598 | + $agpr0 = COPY $vgpr0 |
| 1599 | + S_NOP 0, implicit killed $vgpr0_vgpr1 |
| 1600 | + $agpr1 = COPY $agpr0 |
| 1601 | +
|
| 1602 | +... |
0 commit comments