2020-06-05 03:31:28 +08:00
|
|
|
# RUN: llc -march=amdgcn -mcpu=fiji -run-pass si-insert-waitcnts %s -o - | FileCheck %s
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
--- |
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @basic_insert_dcache_wb() {
|
2016-11-26 01:37:09 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @explicit_flush_after() {
|
2016-11-26 01:37:09 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @explicit_flush_before() {
|
2016-11-26 01:37:09 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @no_scalar_store() {
|
2016-11-26 01:37:09 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @multi_block_store() {
|
2016-11-26 01:37:09 +08:00
|
|
|
bb0:
|
|
|
|
br i1 undef, label %bb1, label %bb2
|
|
|
|
|
|
|
|
bb1:
|
|
|
|
ret void
|
|
|
|
|
|
|
|
bb2:
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @one_block_store() {
|
2016-11-26 01:37:09 +08:00
|
|
|
bb0:
|
|
|
|
br i1 undef, label %bb1, label %bb2
|
|
|
|
|
|
|
|
bb1:
|
|
|
|
ret void
|
|
|
|
|
|
|
|
bb2:
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define amdgpu_ps float @si_return() {
|
|
|
|
ret float undef
|
|
|
|
}
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
# CHECK-LABEL: name: basic_insert_dcache_wb
|
|
|
|
# CHECK: bb.0:
|
|
|
|
# CHECK-NEXT: S_STORE_DWORD
|
|
|
|
# CHECK-NEXT: S_DCACHE_WB
|
[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
|
|
|
# CHECK-NEXT: S_ENDPGM 0
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
name: basic_insert_dcache_wb
|
|
|
|
tracksRegLiveness: false
|
2019-03-15 06:54:43 +08:00
|
|
|
machineFunctionInfo:
|
|
|
|
isEntryFunction: true
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
2019-05-01 06:08:23 +08:00
|
|
|
S_STORE_DWORD_SGPR undef $sgpr2, undef $sgpr0_sgpr1, undef $m0, 0, 0
|
[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
|
2016-11-26 01:37:09 +08:00
|
|
|
...
|
|
|
|
---
|
|
|
|
# Already has an explicitly requested flush after the last store.
|
|
|
|
# CHECK-LABEL: name: explicit_flush_after
|
|
|
|
# CHECK: bb.0:
|
|
|
|
# CHECK-NEXT: S_STORE_DWORD
|
|
|
|
# CHECK-NEXT: S_DCACHE_WB
|
[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
|
|
|
# CHECK-NEXT: S_ENDPGM 0
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
name: explicit_flush_after
|
|
|
|
tracksRegLiveness: false
|
2019-03-15 06:54:43 +08:00
|
|
|
machineFunctionInfo:
|
|
|
|
isEntryFunction: true
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
2019-05-01 06:08:23 +08:00
|
|
|
S_STORE_DWORD_SGPR undef $sgpr2, undef $sgpr0_sgpr1, undef $m0, 0, 0
|
2016-11-26 01:37:09 +08:00
|
|
|
S_DCACHE_WB
|
[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
|
2016-11-26 01:37:09 +08:00
|
|
|
...
|
|
|
|
---
|
|
|
|
# Already has an explicitly requested flush before the last store.
|
|
|
|
# CHECK-LABEL: name: explicit_flush_before
|
|
|
|
# CHECK: bb.0:
|
|
|
|
# CHECK-NEXT: S_DCACHE_WB
|
|
|
|
# CHECK-NEXT: S_STORE_DWORD
|
|
|
|
# CHECK-NEXT: S_DCACHE_WB
|
[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
|
|
|
# CHECK-NEXT: S_ENDPGM 0
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
name: explicit_flush_before
|
|
|
|
tracksRegLiveness: false
|
2019-03-15 06:54:43 +08:00
|
|
|
machineFunctionInfo:
|
|
|
|
isEntryFunction: true
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
S_DCACHE_WB
|
2019-05-01 06:08:23 +08:00
|
|
|
S_STORE_DWORD_SGPR undef $sgpr2, undef $sgpr0_sgpr1, undef $m0, 0, 0
|
[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
|
2016-11-26 01:37:09 +08:00
|
|
|
...
|
|
|
|
---
|
|
|
|
# CHECK-LABEL: no_scalar_store
|
|
|
|
# CHECK: bb.0
|
[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
|
|
|
# CHECK-NEXT: S_ENDPGM 0
|
2016-11-26 01:37:09 +08:00
|
|
|
name: no_scalar_store
|
|
|
|
tracksRegLiveness: false
|
2019-03-15 06:54:43 +08:00
|
|
|
machineFunctionInfo:
|
|
|
|
isEntryFunction: true
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
[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
|
2016-11-26 01:37:09 +08:00
|
|
|
...
|
|
|
|
|
|
|
|
# CHECK-LABEL: name: multi_block_store
|
|
|
|
# CHECK: bb.0:
|
|
|
|
# CHECK-NEXT: S_STORE_DWORD
|
|
|
|
# CHECK-NEXT: S_DCACHE_WB
|
[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
|
|
|
# CHECK-NEXT: S_ENDPGM 0
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
# CHECK: bb.1:
|
|
|
|
# CHECK-NEXT: S_STORE_DWORD
|
|
|
|
# CHECK-NEXT: S_DCACHE_WB
|
[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
|
|
|
# CHECK-NEXT: S_ENDPGM 0
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
name: multi_block_store
|
|
|
|
tracksRegLiveness: false
|
2019-03-15 06:54:43 +08:00
|
|
|
machineFunctionInfo:
|
|
|
|
isEntryFunction: true
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
2019-05-01 06:08:23 +08:00
|
|
|
S_STORE_DWORD_SGPR undef $sgpr2, undef $sgpr0_sgpr1, undef $m0, 0, 0
|
[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
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
bb.1:
|
2019-05-01 06:08:23 +08:00
|
|
|
S_STORE_DWORD_SGPR undef $sgpr4, undef $sgpr6_sgpr7, undef $m0, 0, 0
|
[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
|
2016-11-26 01:37:09 +08:00
|
|
|
...
|
|
|
|
...
|
|
|
|
|
|
|
|
# This one should be able to omit the flush in the storeless block but
|
|
|
|
# this isn't handled now.
|
|
|
|
|
|
|
|
# CHECK-LABEL: name: one_block_store
|
|
|
|
# CHECK: bb.0:
|
|
|
|
# CHECK-NEXT: S_DCACHE_WB
|
[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
|
|
|
# CHECK-NEXT: S_ENDPGM 0
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
# CHECK: bb.1:
|
|
|
|
# CHECK-NEXT: S_STORE_DWORD
|
|
|
|
# CHECK-NEXT: S_DCACHE_WB
|
[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
|
|
|
# CHECK-NEXT: S_ENDPGM 0
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
name: one_block_store
|
|
|
|
tracksRegLiveness: false
|
2019-03-15 06:54:43 +08:00
|
|
|
machineFunctionInfo:
|
|
|
|
isEntryFunction: true
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
[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
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
bb.1:
|
2019-05-01 06:08:23 +08:00
|
|
|
S_STORE_DWORD_SGPR undef $sgpr4, undef $sgpr6_sgpr7, undef $m0, 0, 0
|
[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
|
2016-11-26 01:37:09 +08:00
|
|
|
...
|
|
|
|
---
|
|
|
|
# CHECK-LABEL: name: si_return
|
|
|
|
# CHECK: bb.0:
|
|
|
|
# CHECK-NEXT: S_STORE_DWORD
|
|
|
|
# CHECK-NEXT: S_WAITCNT
|
|
|
|
# CHECK-NEXT: S_DCACHE_WB
|
|
|
|
# CHECK-NEXT: SI_RETURN
|
|
|
|
|
|
|
|
name: si_return
|
|
|
|
tracksRegLiveness: false
|
2019-03-15 06:54:43 +08:00
|
|
|
machineFunctionInfo:
|
|
|
|
isEntryFunction: true
|
2016-11-26 01:37:09 +08:00
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
2019-05-01 06:08:23 +08:00
|
|
|
S_STORE_DWORD_SGPR undef $sgpr2, undef $sgpr0_sgpr1, undef $m0, 0, 0
|
2018-02-01 06:04:26 +08:00
|
|
|
SI_RETURN_TO_EPILOG undef $vgpr0
|
2016-11-26 01:37:09 +08:00
|
|
|
...
|