llvm-for-llvmta/test/Analysis/LegacyDivergenceAnalysis/AMDGPU/loads.ll

16 lines
552 B
LLVM
Raw Normal View History

2022-04-25 10:02:23 +02:00
; RUN: opt -mtriple=amdgcn-- -amdgpu-use-legacy-divergence-analysis -analyze -divergence %s | FileCheck %s
; Test that we consider loads from flat and private addrspaces to be divergent.
; CHECK: DIVERGENT: %val = load i32, i32* %flat, align 4
define amdgpu_kernel void @flat_load(i32* %flat) {
%val = load i32, i32* %flat, align 4
ret void
}
; CHECK: DIVERGENT: %val = load i32, i32 addrspace(5)* %priv, align 4
define amdgpu_kernel void @private_load(i32 addrspace(5)* %priv) {
%val = load i32, i32 addrspace(5)* %priv, align 4
ret void
}