1 ; RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s
3 define void @test_load_store(half addrspace(1)* %in, half addrspace(1)* %out) {
4 ; CHECK-LABEL: @test_load_store
5 ; CHECK: BUFFER_LOAD_USHORT [[TMP:v[0-9]+]]
6 ; CHECK: BUFFER_STORE_SHORT [[TMP]]
7 %val = load half addrspace(1)* %in
8 store half %val, half addrspace(1) * %out
12 define void @test_bitcast_from_half(half addrspace(1)* %in, i16 addrspace(1)* %out) {
13 ; CHECK-LABEL: @test_bitcast_from_half
14 ; CHECK: BUFFER_LOAD_USHORT [[TMP:v[0-9]+]]
15 ; CHECK: BUFFER_STORE_SHORT [[TMP]]
16 %val = load half addrspace(1) * %in
17 %val_int = bitcast half %val to i16
18 store i16 %val_int, i16 addrspace(1)* %out
22 define void @test_bitcast_to_half(half addrspace(1)* %out, i16 addrspace(1)* %in) {
23 ; CHECK-LABEL: @test_bitcast_to_half
24 ; CHECK: BUFFER_LOAD_USHORT [[TMP:v[0-9]+]]
25 ; CHECK: BUFFER_STORE_SHORT [[TMP]]
26 %val = load i16 addrspace(1)* %in
27 %val_fp = bitcast i16 %val to half
28 store half %val_fp, half addrspace(1)* %out