1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/CodeGen/AMDGPU/replace-lds-by-ptr-ignore-small-lds.ll
Jon Chesterfield 7f9c53b162 Disable ReplaceLDS pass, patch up tests to match
Most tests passed with an extra argument to explicitly enable the pass.
One does not, deleted it as part of this change. I can't see why the codegen
would be different between default on and default off but switched on. It
can be retrieved from the project history.

This would be a revert, but git revert was not clean. Disabling the pass
and leaving it in tree is less likely to cause breakage elsewhere than
patching up the git revert conflicts on unfamiliar code. It'll be landed
without review, as @hsmhsm is believed unavailable at present.

Differential Revision: https://reviews.llvm.org/D104962
2021-06-26 01:36:42 +01:00

32 lines
836 B
LLVM

; RUN: opt -S -mtriple=amdgcn-- -amdgpu-replace-lds-use-with-pointer -amdgpu-enable-lds-replace-with-pointer=true < %s | FileCheck %s
; DESCRIPTION ;
;
; LDS global @small_lds is used within non-kernel function @f0, and @f0 is reachable
; from kernel @k0, but since @small_lds too small for pointer replacement, pointer
; replacement does not take place.
;
; CHECK: @small_lds = addrspace(3) global i8 undef, align 1
@small_lds = addrspace(3) global i8 undef, align 1
; CHECK-NOT: @small_lds.ptr
define void @f0() {
; CHECK-LABEL: entry:
; CHECK: store i8 1, i8 addrspace(3)* @small_lds, align 1
; CHECK: ret void
entry:
store i8 1, i8 addrspace(3)* @small_lds, align 1
ret void
}
define amdgpu_kernel void @k0() {
; CHECK-LABEL: entry:
; CHECK: call void @f0()
; CHECK: ret void
entry:
call void @f0()
ret void
}