xref: /llvm-project/llvm/test/CodeGen/AMDGPU/selectcc.ll (revision 9e9907f1cfa424366fba58d9520f9305b537cec9)
1; RUN: llc -verify-machineinstrs -mtriple=r600 -mcpu=redwood < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
2; RUN: llc -verify-machineinstrs -mtriple=amdgcn -mcpu=tahiti < %s | FileCheck -check-prefixes=GCN,SI -check-prefix=FUNC %s
3; RUN: llc -verify-machineinstrs -mtriple=amdgcn -mcpu=tonga < %s | FileCheck -check-prefixes=GCN,VI -check-prefix=FUNC %s
4
5; FUNC-LABEL: {{^}}selectcc_i64:
6; EG: XOR_INT
7; EG: XOR_INT
8; EG: OR_INT
9; EG: CNDE_INT
10; EG: CNDE_INT
11; SI: v_cmp_eq_u64
12; VI: s_cmp_eq_u64
13; GCN: s_cselect_b32
14define amdgpu_kernel void @selectcc_i64(ptr addrspace(1) %out, i64 %lhs, i64 %rhs, i64 %true, i64 %false) {
15entry:
16  %0 = icmp eq i64 %lhs, %rhs
17  %1 = select i1 %0, i64 %true, i64 %false
18  store i64 %1, ptr addrspace(1) %out
19  ret void
20}
21