source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/AMDGPU/sext-eliminate.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 826 bytes
Line 
1; RUN: llc -march=r600 -mcpu=cypress -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
2
3
4; FUNC-LABEL: {{^}}sext_in_reg_i1_i32_add:
5
6; EG: MEM_{{.*}} STORE_{{.*}} [[RES:T[0-9]+\.[XYZW]]], [[ADDR:T[0-9]+.[XYZW]]]
7; EG: SUB_INT {{[* ]*}}[[RES]]
8; EG-NOT: BFE
9define 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
13  ret void
14}
15
16; FUNC-LABEL: {{^}}sext_in_reg_i1_i32_sub:
17
18; EG: MEM_{{.*}} STORE_{{.*}} [[RES:T[0-9]+\.[XYZW]]], [[ADDR:T[0-9]+.[XYZW]]]
19; EG: ADD_INT {{[* ]*}}[[RES]]
20; EG-NOT: BFE
21define 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
25  ret void
26}
Note: See TracBrowser for help on using the repository browser.