Home | History | Annotate | Download | only in R600
      1 ; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs< %s | FileCheck -check-prefix=SI %s
      2 
      3 
      4 ; SI-LABEL: @global_truncstore_i32_to_i1
      5 ; SI: S_LOAD_DWORD [[LOAD:s[0-9]+]],
      6 ; SI: S_AND_B32 [[SREG:s[0-9]+]], [[LOAD]], 1
      7 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], [[SREG]]
      8 ; SI: BUFFER_STORE_BYTE [[VREG]],
      9 define void @global_truncstore_i32_to_i1(i1 addrspace(1)* %out, i32 %val) nounwind {
     10   %trunc = trunc i32 %val to i1
     11   store i1 %trunc, i1 addrspace(1)* %out, align 1
     12   ret void
     13 }
     14 
     15 ; SI-LABEL: @global_truncstore_i64_to_i1
     16 ; SI: BUFFER_STORE_BYTE
     17 define void @global_truncstore_i64_to_i1(i1 addrspace(1)* %out, i64 %val) nounwind {
     18   %trunc = trunc i64 %val to i1
     19   store i1 %trunc, i1 addrspace(1)* %out, align 1
     20   ret void
     21 }
     22 
     23 ; SI-LABEL: @global_truncstore_i16_to_i1
     24 ; SI: S_LOAD_DWORD [[LOAD:s[0-9]+]],
     25 ; SI: S_AND_B32 [[SREG:s[0-9]+]], [[LOAD]], 1
     26 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], [[SREG]]
     27 ; SI: BUFFER_STORE_BYTE [[VREG]],
     28 define void @global_truncstore_i16_to_i1(i1 addrspace(1)* %out, i16 %val) nounwind {
     29   %trunc = trunc i16 %val to i1
     30   store i1 %trunc, i1 addrspace(1)* %out, align 1
     31   ret void
     32 }
     33