2017-06-06 06:58:57 +08:00
|
|
|
# RUN: llc -march=amdgcn -verify-machineinstrs -run-pass=simple-register-coalescing,rename-independent-subregs -o - %s | FileCheck -check-prefix=GCN %s
|
|
|
|
---
|
|
|
|
|
|
|
|
# GCN-LABEL: name: mac_invalid_operands
|
2018-02-01 06:04:26 +08:00
|
|
|
# GCN: undef %18.sub0:vreg_128 = V_MAC_F32_e32 undef %3:vgpr_32, undef %9:vgpr_32, undef %18.sub0, implicit $exec
|
2017-06-06 06:58:57 +08:00
|
|
|
|
|
|
|
name: mac_invalid_operands
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 1
|
2017-06-06 06:58:57 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
2019-03-28 00:12:26 +08:00
|
|
|
machineFunctionInfo:
|
|
|
|
scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
|
|
|
|
scratchWaveOffsetReg: '$sgpr4'
|
|
|
|
frameOffsetReg: '$sgpr4'
|
|
|
|
|
2017-06-06 06:58:57 +08:00
|
|
|
registers:
|
|
|
|
- { id: 0, class: vreg_128 }
|
|
|
|
- { id: 1, class: vreg_128 }
|
|
|
|
- { id: 2, class: sgpr_64 }
|
|
|
|
- { id: 3, class: vgpr_32 }
|
|
|
|
- { id: 4, class: vgpr_32 }
|
|
|
|
- { id: 5, class: vgpr_32 }
|
|
|
|
- { id: 6, class: vgpr_32 }
|
|
|
|
- { id: 7, class: sreg_64 }
|
|
|
|
- { id: 8, class: vgpr_32 }
|
|
|
|
- { id: 9, class: vgpr_32 }
|
|
|
|
- { id: 10, class: vreg_64 }
|
|
|
|
- { id: 11, class: vreg_64 }
|
|
|
|
- { id: 12, class: vreg_128 }
|
|
|
|
- { id: 13, class: vreg_128 }
|
|
|
|
- { id: 14, class: vgpr_32 }
|
|
|
|
- { id: 15, class: vreg_64 }
|
|
|
|
- { id: 16, class: vgpr_32 }
|
|
|
|
- { id: 17, class: vreg_128 }
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
successors: %bb.2, %bb.1
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
%7 = V_CMP_NEQ_F32_e64 0, 0, 0, undef %3, 0, implicit $exec
|
|
|
|
$vcc = COPY killed %7
|
|
|
|
S_CBRANCH_VCCZ %bb.2, implicit killed $vcc
|
2017-06-06 06:58:57 +08:00
|
|
|
|
|
|
|
bb.1:
|
|
|
|
successors: %bb.3
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
%4 = V_ADD_F32_e32 undef %6, undef %5, implicit $exec
|
2017-06-06 06:58:57 +08:00
|
|
|
undef %12.sub0 = COPY killed %4
|
|
|
|
%17 = COPY killed %12
|
|
|
|
S_BRANCH %bb.3
|
|
|
|
|
|
|
|
bb.2:
|
|
|
|
successors: %bb.3
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
%8 = V_MAC_F32_e32 undef %3, undef %9, undef %8, implicit $exec
|
2017-06-06 06:58:57 +08:00
|
|
|
undef %13.sub0 = COPY %8
|
|
|
|
%13.sub1 = COPY %8
|
|
|
|
%13.sub2 = COPY killed %8
|
|
|
|
%0 = COPY killed %13
|
|
|
|
%17 = COPY killed %0
|
|
|
|
|
|
|
|
bb.3:
|
|
|
|
%1 = COPY killed %17
|
2019-05-01 06:08:23 +08:00
|
|
|
FLAT_STORE_DWORD undef %10, %1.sub2, 0, 0, 0, 0, implicit $exec, implicit $flat_scr
|
2017-06-06 06:58:57 +08:00
|
|
|
%14 = COPY %1.sub1
|
|
|
|
%16 = COPY killed %1.sub0
|
|
|
|
undef %15.sub0 = COPY killed %16
|
|
|
|
%15.sub1 = COPY killed %14
|
2019-05-01 06:08:23 +08:00
|
|
|
FLAT_STORE_DWORDX2 undef %11, killed %15, 0, 0, 0, 0, implicit $exec, implicit $flat_scr
|
[AMDGPU] Add support for immediate operand for S_ENDPGM
Summary:
Add support for immediate operand in S_ENDPGM
Change-Id: I0c56a076a10980f719fb2a8f16407e9c301013f6
Reviewers: alexshap
Subscribers: qcolombet, arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, eraman, arphaman, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59213
llvm-svn: 355902
2019-03-12 17:52:58 +08:00
|
|
|
S_ENDPGM 0
|
2017-06-06 06:58:57 +08:00
|
|
|
|
|
|
|
...
|
2017-06-27 05:33:36 +08:00
|
|
|
---
|
|
|
|
# Make sure others uses after the mac are properly handled and not
|
|
|
|
# left unreplaced due to iterator issues from substituteRegister.
|
|
|
|
|
|
|
|
# GCN-LABEL: name: vreg_does_not_dominate
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
# GCN: undef %8.sub1:vreg_128 = V_MAC_F32_e32 undef %2:vgpr_32, undef %1:vgpr_32, undef %8.sub1, implicit $exec
|
|
|
|
# GCN: undef %7.sub0:vreg_128 = V_MOV_B32_e32 0, implicit $exec
|
2017-10-25 02:04:54 +08:00
|
|
|
# GCN: undef %9.sub2:vreg_128 = COPY %7.sub0
|
2017-06-27 05:33:36 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
# GCN: undef %6.sub3:vreg_128 = V_ADD_F32_e32 undef %3:vgpr_32, undef %3:vgpr_32, implicit $exec
|
|
|
|
# GCN: undef %7.sub0:vreg_128 = V_ADD_F32_e64 0, 0, 0, 0, 0, 0, implicit $exec
|
|
|
|
# GCN: %8.sub1:vreg_128 = V_ADD_F32_e32 %8.sub1, %8.sub1, implicit $exec
|
2017-06-27 05:33:36 +08:00
|
|
|
|
|
|
|
# GCN: BUFFER_STORE_DWORD_OFFEN %6.sub3, %0,
|
|
|
|
# GCN: BUFFER_STORE_DWORD_OFFEN %9.sub2, %0,
|
|
|
|
# GCN: BUFFER_STORE_DWORD_OFFEN %8.sub1, %0,
|
|
|
|
# GCN: BUFFER_STORE_DWORD_OFFEN %7.sub0, %0,
|
|
|
|
name: vreg_does_not_dominate
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 1
|
2017-06-27 05:33:36 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
2019-03-28 00:12:26 +08:00
|
|
|
machineFunctionInfo:
|
|
|
|
scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
|
|
|
|
scratchWaveOffsetReg: '$sgpr4'
|
|
|
|
frameOffsetReg: '$sgpr4'
|
2017-06-27 05:33:36 +08:00
|
|
|
registers:
|
|
|
|
- { id: 0, class: vgpr_32, preferred-register: '' }
|
|
|
|
- { id: 1, class: vgpr_32, preferred-register: '' }
|
|
|
|
- { id: 2, class: vgpr_32, preferred-register: '' }
|
|
|
|
- { id: 3, class: vgpr_32, preferred-register: '' }
|
|
|
|
- { id: 4, class: vgpr_32, preferred-register: '' }
|
|
|
|
- { id: 5, class: sreg_64, preferred-register: '' }
|
|
|
|
- { id: 6, class: vreg_128, preferred-register: '' }
|
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$vgpr0', virtual-reg: '%0' }
|
|
|
|
- { reg: '$sgpr30_sgpr31', virtual-reg: '%5' }
|
2017-06-27 05:33:36 +08:00
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
successors: %bb.2, %bb.1
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $vgpr0, $sgpr30_sgpr31, $sgpr5
|
2017-06-27 05:33:36 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
%5 = COPY $sgpr30_sgpr31
|
|
|
|
%0 = COPY $vgpr0
|
|
|
|
undef %6.sub1 = V_MAC_F32_e32 undef %2, undef %1, undef %6.sub1, implicit $exec
|
|
|
|
%6.sub0 = V_MOV_B32_e32 0, implicit $exec
|
2017-06-27 05:33:36 +08:00
|
|
|
%6.sub2 = COPY %6.sub0
|
2018-02-01 06:04:26 +08:00
|
|
|
S_CBRANCH_VCCNZ %bb.2, implicit undef $vcc
|
2017-06-27 05:33:36 +08:00
|
|
|
S_BRANCH %bb.1
|
|
|
|
|
|
|
|
bb.1:
|
|
|
|
successors: %bb.2
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
%6.sub3 = V_ADD_F32_e32 undef %3, undef %3, implicit $exec
|
|
|
|
%6.sub0 = V_ADD_F32_e64 0, 0, 0, 0, 0, 0, implicit $exec
|
|
|
|
%6.sub1 = V_ADD_F32_e32 %6.sub1, %6.sub1, implicit $exec
|
2017-06-27 05:33:36 +08:00
|
|
|
%6.sub2 = COPY %6.sub0
|
|
|
|
|
|
|
|
bb.2:
|
2019-05-01 06:08:23 +08:00
|
|
|
BUFFER_STORE_DWORD_OFFEN %6.sub3, %0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 12, 0, 0, 0, 0, implicit $exec
|
|
|
|
BUFFER_STORE_DWORD_OFFEN %6.sub2, %0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 8, 0, 0, 0, 0, implicit $exec
|
|
|
|
BUFFER_STORE_DWORD_OFFEN %6.sub1, %0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 4, 0, 0, 0, 0, implicit $exec
|
|
|
|
BUFFER_STORE_DWORD_OFFEN %6.sub0, %0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, 0, implicit $exec
|
2018-02-01 06:04:26 +08:00
|
|
|
$sgpr30_sgpr31 = COPY %5
|
2019-03-28 00:12:26 +08:00
|
|
|
S_SETPC_B64_return $sgpr30_sgpr31
|
2017-06-27 05:33:36 +08:00
|
|
|
|
|
|
|
...
|
2017-06-28 02:28:10 +08:00
|
|
|
|
|
|
|
# GCN-LABEL: name: inf_loop_tied_operand
|
|
|
|
# GCN: bb.0:
|
2018-02-01 06:04:26 +08:00
|
|
|
# GCN-NEXT: undef %2.sub0:vreg_128 = V_MAC_F32_e32 1073741824, undef %0:vgpr_32, undef %2.sub0, implicit $exec
|
2017-10-25 02:04:54 +08:00
|
|
|
# GCN-NEXT: dead undef %3.sub1:vreg_128 = COPY %2.sub0
|
2017-06-28 02:28:10 +08:00
|
|
|
|
|
|
|
name: inf_loop_tied_operand
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: vgpr_32, preferred-register: '' }
|
|
|
|
- { id: 1, class: vgpr_32, preferred-register: '' }
|
|
|
|
- { id: 2, class: vreg_128, preferred-register: '' }
|
|
|
|
body: |
|
|
|
|
bb.0:
|
2018-02-01 06:04:26 +08:00
|
|
|
%1 = V_MAC_F32_e32 1073741824, undef %0, undef %1, implicit $exec
|
2017-06-28 02:28:10 +08:00
|
|
|
undef %2.sub0 = COPY %1
|
|
|
|
%2.sub1 = COPY %1
|
|
|
|
|
|
|
|
...
|