diff options
author | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2018-06-29 16:26:53 +0000 |
---|---|---|
committer | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2018-06-29 16:26:53 +0000 |
commit | 20d4795d933c3764e34d9a9a7a3e61f797980a6b (patch) | |
tree | 783b01b028e4793a834f127826db0442eabd9273 /llvm/test/CodeGen/AMDGPU/si-annotate-cf.ll | |
parent | 3994bafbc7b0bb1d4f21a2506be2a134aa6f886c (diff) | |
download | bcm5719-llvm-20d4795d933c3764e34d9a9a7a3e61f797980a6b.tar.gz bcm5719-llvm-20d4795d933c3764e34d9a9a7a3e61f797980a6b.zip |
[AMDGPU] Enable LICM in the BE pipeline
This allows to hoist code portion to compute reciprocal of loop
invariant denominator in integer division after codegen prepare
expansion.
Differential Revision: https://reviews.llvm.org/D48604
llvm-svn: 335988
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/si-annotate-cf.ll')
-rw-r--r-- | llvm/test/CodeGen/AMDGPU/si-annotate-cf.ll | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/si-annotate-cf.ll b/llvm/test/CodeGen/AMDGPU/si-annotate-cf.ll index 7e7f6fc5e6d..73e56593ce8 100644 --- a/llvm/test/CodeGen/AMDGPU/si-annotate-cf.ll +++ b/llvm/test/CodeGen/AMDGPU/si-annotate-cf.ll @@ -1,5 +1,5 @@ -; RUN: llc < %s -march=amdgcn -mcpu=verde -verify-machineinstrs | FileCheck --check-prefix=SI --check-prefix=FUNC %s -; RUN: llc < %s -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs | FileCheck --check-prefix=SI --check-prefix=FUNC %s +; RUN: llc < %s -march=amdgcn -mcpu=verde -asm-verbose=0 -verify-machineinstrs | FileCheck --check-prefix=SI --check-prefix=FUNC %s +; RUN: llc < %s -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -asm-verbose=0 -verify-machineinstrs | FileCheck --check-prefix=SI --check-prefix=FUNC %s ; FUNC-LABEL: {{^}}break_inserted_outside_of_loop: @@ -89,17 +89,24 @@ declare float @llvm.fabs.f32(float) nounwind readnone ; This broke the old AMDIL cfg structurizer ; FUNC-LABEL: {{^}}loop_land_info_assert: -; SI: s_cmp_lt_i32 -; SI-NEXT: s_cbranch_scc1 [[ENDPGM:BB[0-9]+_[0-9]+]] - -; SI: s_cmpk_lt_i32 -; SI-NEXT: s_cbranch_scc0 [[ENDPGM]] - -; SI: [[INFLOOP:BB[0-9]+_[0-9]+]] -; SI: s_cbranch_vccnz [[INFLOOP]] - -; SI: [[ENDPGM]]: -; SI: s_endpgm +; SI: v_cmp_lt_i32_e64 [[CMP4:s\[[0-9:]+\]]], s{{[0-9]+}}, 4{{$}} +; SI: s_and_b64 vcc, exec, [[CMP4]] +; SI-NEXT: s_cbranch_vccnz [[BR1:BB[0-9_]+]] +; SI-NEXT: s_branch [[BR2:BB[0-9_]+]] +; SI-NEXT: BB{{[0-9_]+}}: +; SI-NEXT: buffer_store_dword + +; SI: [[INFLOOP:BB[0-9]+_[0-9]+]]: + +; SI: [[BR1]]: +; SI-NEXT: s_and_b64 vcc, exec, +; SI-NEXT: s_cbranch_vccnz [[ENDPGM:BB[0-9]+_[0-9]+]] +; SI: s_branch [[INFLOOP]] +; SI-NEXT: [[BR2]]: +; SI: s_cbranch_vccz [[ENDPGM]] + +; SI: [[ENDPGM]]: +; SI-NEXT: s_endpgm define amdgpu_kernel void @loop_land_info_assert(i32 %c0, i32 %c1, i32 %c2, i32 %c3, i32 %x, i32 %y, i1 %arg) nounwind { entry: %cmp = icmp sgt i32 %c0, 0 @@ -144,7 +151,6 @@ return: ret void } - declare i32 @llvm.amdgcn.mbcnt.lo(i32, i32) #0 attributes #0 = { nounwind readnone } |