1 ; RUN: llc -march=r600 -mcpu=SI < %s | FileCheck -check-prefix=SI %s
4 ; SI-LABEL: @global_truncstore_i32_to_i1
5 ; SI: S_LOAD_DWORD [[LOAD:s[0-9]+]],
6 ; SI: V_AND_B32_e64 [[VREG:v[0-9]+]], 1, [[LOAD]], 0, 0, 0, 0
7 ; SI: BUFFER_STORE_BYTE [[VREG]],
8 define void @global_truncstore_i32_to_i1(i1 addrspace(1)* %out, i32 %val) nounwind {
9 %trunc = trunc i32 %val to i1
10 store i1 %trunc, i1 addrspace(1)* %out, align 1
14 ; SI-LABEL: @global_truncstore_i64_to_i1
15 ; SI: BUFFER_STORE_BYTE
16 define void @global_truncstore_i64_to_i1(i1 addrspace(1)* %out, i64 %val) nounwind {
17 %trunc = trunc i64 %val to i1
18 store i1 %trunc, i1 addrspace(1)* %out, align 1
22 ; SI-LABEL: @global_truncstore_i16_to_i1
23 ; SI: S_LOAD_DWORD [[LOAD:s[0-9]+]],
24 ; SI: V_AND_B32_e64 [[VREG:v[0-9]+]], 1, [[LOAD]], 0, 0, 0, 0
25 ; SI: BUFFER_STORE_BYTE [[VREG]],
26 define void @global_truncstore_i16_to_i1(i1 addrspace(1)* %out, i16 %val) nounwind {
27 %trunc = trunc i16 %val to i1
28 store i1 %trunc, i1 addrspace(1)* %out, align 1