1 ; RUN: llc -march=r600 -mcpu=cypress -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
4 ; FUNC-LABEL: {{^}}sext_in_reg_i1_i32_add:
6 ; EG: MEM_{{.*}} STORE_{{.*}} [[RES:T[0-9]+\.[XYZW]]], [[ADDR:T[0-9]+.[XYZW]]]
7 ; EG: SUB_INT {{[* ]*}}[[RES]]
9 define amdgpu_kernel void @sext_in_reg_i1_i32_add(i32 addrspace(1)* %out, i1 %a, i32 %b) {
10 %sext = sext i1 %a to i32
11 %res = add i32 %b, %sext
12 store i32 %res, i32 addrspace(1)* %out
16 ; FUNC-LABEL: {{^}}sext_in_reg_i1_i32_sub:
18 ; EG: MEM_{{.*}} STORE_{{.*}} [[RES:T[0-9]+\.[XYZW]]], [[ADDR:T[0-9]+.[XYZW]]]
19 ; EG: ADD_INT {{[* ]*}}[[RES]]
21 define amdgpu_kernel void @sext_in_reg_i1_i32_sub(i32 addrspace(1)* %out, i1 %a, i32 %b) {
22 %sext = sext i1 %a to i32
23 %res = sub i32 %b, %sext
24 store i32 %res, i32 addrspace(1)* %out