• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -S -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -infer-address-spaces %s | FileCheck %s
2
3; Make sure addrspace(0) is still treated as flat on targets without
4; flat instructions. It's still flat, it just doesn't work.
5
6; CHECK-LABEL: @load_flat_from_global(
7; CHECK-NEXT: %tmp1 = load float, float addrspace(1)* %ptr
8; CHECK-NEXT: ret float %tmp1
9define float @load_flat_from_global(float addrspace(1)*%ptr) #0 {
10  %tmp0 = addrspacecast float addrspace(1)* %ptr to float*
11  %tmp1 = load float, float* %tmp0
12  ret float %tmp1
13}
14