diff options
| author | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2020-01-13 17:01:36 -0800 |
|---|---|---|
| committer | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2020-01-14 01:18:59 -0800 |
| commit | ad741853c38880dff99cd5b5035b8965c5a73011 (patch) | |
| tree | 74aff53a8758bb76d669d08349b90e5cd0ed4526 /llvm/test/CodeGen/AMDGPU | |
| parent | 6d8abe424a77f736fbed114eeac574b9bfe6b0c1 (diff) | |
| download | bcm5719-llvm-ad741853c38880dff99cd5b5035b8965c5a73011.tar.gz bcm5719-llvm-ad741853c38880dff99cd5b5035b8965c5a73011.zip | |
[AMDGPU] Model distance to instruction in bundle
This change allows to model the height of the instruction
within a bundle for latency adjustment purposes.
Differential Revision: https://reviews.llvm.org/D72669
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU')
| -rw-r--r-- | llvm/test/CodeGen/AMDGPU/bundle-latency.mir | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/bundle-latency.mir b/llvm/test/CodeGen/AMDGPU/bundle-latency.mir new file mode 100644 index 00000000000..603d0cf33f9 --- /dev/null +++ b/llvm/test/CodeGen/AMDGPU/bundle-latency.mir @@ -0,0 +1,44 @@ +# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py +# RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs -run-pass=post-RA-sched %s -o - | FileCheck -check-prefix=GCN %s + +# Check that we move consumer further from producer, even if one of them is in a bundle. + +--- +name: src_bundle_latency +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: src_bundle_latency + ; GCN: $vgpr0, $vgpr1 = BUNDLE undef $vgpr3_vgpr4, implicit $exec { + ; GCN: $vgpr0 = GLOBAL_LOAD_DWORD undef $vgpr3_vgpr4, 0, 0, 0, 0, implicit $exec + ; GCN: $vgpr1 = GLOBAL_LOAD_DWORD undef $vgpr3_vgpr4, 4, 0, 0, 0, implicit $exec + ; GCN: } + ; GCN: $vgpr6 = V_ADD_F32_e32 killed $vgpr0, $vgpr0, implicit $exec + ; GCN: $vgpr5 = V_ADD_F32_e32 killed $vgpr1, $vgpr1, implicit $exec + $vgpr0, $vgpr1 = BUNDLE undef $vgpr3_vgpr4, implicit $exec { + $vgpr0 = GLOBAL_LOAD_DWORD undef $vgpr3_vgpr4, 0, 0, 0, 0, implicit $exec + $vgpr1 = GLOBAL_LOAD_DWORD undef $vgpr3_vgpr4, 4, 0, 0, 0, implicit $exec + } + $vgpr5 = V_ADD_F32_e32 $vgpr1, $vgpr1, implicit $exec + $vgpr6 = V_ADD_F32_e32 $vgpr0, $vgpr0, implicit $exec +... + +--- +name: dst_bundle_latency +tracksRegLiveness: true +body: | + bb.0: + ; GCN-LABEL: name: dst_bundle_latency + ; GCN: $vgpr1 = V_ADD_F32_e32 undef $vgpr6, undef $vgpr6, implicit $exec + ; GCN: $vgpr0 = V_ADD_F32_e32 undef $vgpr5, undef $vgpr5, implicit $exec + ; GCN: BUNDLE killed $vgpr0, killed $vgpr1, undef $vgpr3_vgpr4, implicit $exec { + ; GCN: GLOBAL_STORE_DWORD undef $vgpr3_vgpr4, killed $vgpr1, 0, 0, 0, 0, implicit $exec + ; GCN: GLOBAL_STORE_DWORD undef $vgpr3_vgpr4, killed $vgpr0, 4, 0, 0, 0, implicit $exec + ; GCN: } + $vgpr0 = V_ADD_F32_e32 undef $vgpr5, undef $vgpr5, implicit $exec + $vgpr1 = V_ADD_F32_e32 undef $vgpr6, undef $vgpr6, implicit $exec + BUNDLE $vgpr0, $vgpr1, undef $vgpr3_vgpr4, implicit $exec { + GLOBAL_STORE_DWORD undef $vgpr3_vgpr4, $vgpr1, 0, 0, 0, 0, implicit $exec + GLOBAL_STORE_DWORD undef $vgpr3_vgpr4, $vgpr0, 4, 0, 0, 0, implicit $exec + } +... |

