Ignore:
Timestamp:
Jul 13, 2015, 2:11:13 PM (4 years ago)
Author:
cameron
Message:

Upgrade LLVM to 3.6.1

Location:
icGREP/icgrep-devel/llvm-3.6.1.src
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/llvm-3.6.1.src/test/CodeGen/R600/trunc.ll

    r4574 r4664  
    11; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs< %s | FileCheck -check-prefix=SI %s
    22; RUN: llc -march=r600 -mcpu=cypress < %s | FileCheck -check-prefix=EG %s
     3
     4declare i32 @llvm.r600.read.tidig.x() nounwind readnone
    35
    46define void @trunc_i64_to_i32_store(i32 addrspace(1)* %out, i64 %in) {
     
    6668  ret void
    6769}
     70
     71; SI-LABEL: {{^}}s_trunc_i64_to_i1:
     72; SI: s_load_dwordx2 s{{\[}}[[SLO:[0-9]+]]:{{[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, 0xb
     73; SI: v_and_b32_e64 [[MASKED:v[0-9]+]], 1, s[[SLO]]
     74; SI: v_cmp_eq_i32_e64 [[CMP:s\[[0-9]+:[0-9]+\]]], [[MASKED]], 1
     75; SI: v_cndmask_b32_e64 {{v[0-9]+}}, -12, 63, [[CMP]]
     76define void @s_trunc_i64_to_i1(i32 addrspace(1)* %out, i64 %x) {
     77  %trunc = trunc i64 %x to i1
     78  %sel = select i1 %trunc, i32 63, i32 -12
     79  store i32 %sel, i32 addrspace(1)* %out
     80  ret void
     81}
     82
     83; SI-LABEL: {{^}}v_trunc_i64_to_i1:
     84; SI: buffer_load_dwordx2 v{{\[}}[[VLO:[0-9]+]]:{{[0-9]+\]}}
     85; SI: v_and_b32_e32 [[MASKED:v[0-9]+]], 1, v[[VLO]]
     86; SI: v_cmp_eq_i32_e64 [[CMP:s\[[0-9]+:[0-9]+\]]], [[MASKED]], 1
     87; SI: v_cndmask_b32_e64 {{v[0-9]+}}, -12, 63, [[CMP]]
     88define void @v_trunc_i64_to_i1(i32 addrspace(1)* %out, i64 addrspace(1)* %in) {
     89  %tid = call i32 @llvm.r600.read.tidig.x() nounwind readnone
     90  %gep = getelementptr i64 addrspace(1)* %in, i32 %tid
     91  %out.gep = getelementptr i32 addrspace(1)* %out, i32 %tid
     92  %x = load i64 addrspace(1)* %gep
     93
     94  %trunc = trunc i64 %x to i1
     95  %sel = select i1 %trunc, i32 63, i32 -12
     96  store i32 %sel, i32 addrspace(1)* %out.gep
     97  ret void
     98}
Note: See TracChangeset for help on using the changeset viewer.