1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00
llvm-mirror/test/CodeGen/AMDGPU/vectorize-buffer-fat-pointer.ll
Neil Henning 51a5ec492f [AMDGPU] Add an experimental buffer fat pointer address space.
Add an experimental buffer fat pointer address space that is currently
unhandled in the backend. This commit reserves address space 7 as a
non-integral pointer repsenting the 160-bit fat pointer (128-bit buffer
descriptor + 32-bit offset) that is heavily used in graphics workloads
using the AMDGPU backend.

Differential Revision: https://reviews.llvm.org/D58957

llvm-svn: 356373
2019-03-18 14:44:28 +00:00

18 lines
644 B
LLVM

; RUN: opt -S -mtriple=amdgcn-- -load-store-vectorizer < %s | FileCheck -check-prefix=OPT %s
; OPT-LABEL: @func(
define void @func(i32 addrspace(7)* %out) {
entry:
%a0 = getelementptr i32, i32 addrspace(7)* %out, i32 0
%a1 = getelementptr i32, i32 addrspace(7)* %out, i32 1
%a2 = getelementptr i32, i32 addrspace(7)* %out, i32 2
%a3 = getelementptr i32, i32 addrspace(7)* %out, i32 3
; OPT: store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, <4 x i32> addrspace(7)* %0, align 4
store i32 0, i32 addrspace(7)* %a0
store i32 1, i32 addrspace(7)* %a1
store i32 2, i32 addrspace(7)* %a2
store i32 3, i32 addrspace(7)* %a3
ret void
}