
Since e39f6c1844fab59c638d8059a6cf139adb42279a opt will infer the correct datalayout when given a triple. Avoid explicitly specifying it in tests that depend on the AMDGPU target being present to avoid the string becoming out of sync with the TargetInfo value. Only tests with REQUIRES: amdgpu-registered-target or a local lit.cfg were updated to ensure that tests for non-target-specific passes that happen to use the AMDGPU layout still pass when building with a limited set of targets. Reviewed By: shiltian, arsenm Pull Request: https://github.com/llvm/llvm-project/pull/137921
36 lines
1.5 KiB
LLVM
36 lines
1.5 KiB
LLVM
; RUN: opt -S -mtriple=amdgcn-amd-amdhsa --amdgpu-annotate-uniform < %s | FileCheck -check-prefix=OPT %s
|
|
; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-annotate-uniform < %s | FileCheck -check-prefix=OPT %s
|
|
|
|
|
|
; OPT-LABEL: @amdgpu_noclobber_global(
|
|
; OPT-NEXT: %load = load i32, ptr addrspace(1) %in, align 4, !amdgpu.noclobber !0
|
|
define amdgpu_kernel void @amdgpu_noclobber_global( ptr addrspace(1) %in, ptr addrspace(1) %out) {
|
|
%load = load i32, ptr addrspace(1) %in, align 4
|
|
store i32 %load, ptr addrspace(1) %out, align 4
|
|
ret void
|
|
}
|
|
|
|
; OPT-LABEL: @amdgpu_noclobber_local(
|
|
; OPT-NEXT: %load = load i32, ptr addrspace(3) %in, align 4
|
|
define amdgpu_kernel void @amdgpu_noclobber_local( ptr addrspace(3) %in, ptr addrspace(1) %out) {
|
|
%load = load i32, ptr addrspace(3) %in, align 4
|
|
store i32 %load, ptr addrspace(1) %out, align 4
|
|
ret void
|
|
}
|
|
|
|
; OPT-LABEL: @amdgpu_noclobber_private(
|
|
; OPT-NEXT: %load = load i32, ptr addrspace(5) %in, align 4
|
|
define amdgpu_kernel void @amdgpu_noclobber_private( ptr addrspace(5) %in, ptr addrspace(1) %out) {
|
|
%load = load i32, ptr addrspace(5) %in, align 4
|
|
store i32 %load, ptr addrspace(1) %out, align 4
|
|
ret void
|
|
}
|
|
|
|
; OPT-LABEL: @amdgpu_noclobber_flat(
|
|
; OPT-NEXT: %load = load i32, ptr addrspace(4) %in, align 4
|
|
define amdgpu_kernel void @amdgpu_noclobber_flat( ptr addrspace(4) %in, ptr addrspace(1) %out) {
|
|
%load = load i32, ptr addrspace(4) %in, align 4
|
|
store i32 %load, ptr addrspace(1) %out, align 4
|
|
ret void
|
|
}
|