1 ; RUN: llc -mtriple=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,SI %s
2 ; RUN: llc -mtriple=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,VI %s
4 ; GCN-LABEL: {{^}}test_i64_eq:
7 define amdgpu_kernel void @test_i64_eq(ptr addrspace(1) %out, i64 %a, i64 %b) nounwind {
8 %cmp = icmp eq i64 %a, %b
9 %result = sext i1 %cmp to i32
10 store i32 %result, ptr addrspace(1) %out, align 4
14 ; GCN-LABEL: {{^}}test_i64_ne:
17 define amdgpu_kernel void @test_i64_ne(ptr addrspace(1) %out, i64 %a, i64 %b) nounwind {
18 %cmp = icmp ne i64 %a, %b
19 %result = sext i1 %cmp to i32
20 store i32 %result, ptr addrspace(1) %out, align 4
24 ; GCN-LABEL: {{^}}test_i64_slt:
26 define amdgpu_kernel void @test_i64_slt(ptr addrspace(1) %out, i64 %a, i64 %b) nounwind {
27 %cmp = icmp slt i64 %a, %b
28 %result = sext i1 %cmp to i32
29 store i32 %result, ptr addrspace(1) %out, align 4
33 ; GCN-LABEL: {{^}}test_i64_ult:
35 define amdgpu_kernel void @test_i64_ult(ptr addrspace(1) %out, i64 %a, i64 %b) nounwind {
36 %cmp = icmp ult i64 %a, %b
37 %result = sext i1 %cmp to i32
38 store i32 %result, ptr addrspace(1) %out, align 4
42 ; GCN-LABEL: {{^}}test_i64_sle:
44 define amdgpu_kernel void @test_i64_sle(ptr addrspace(1) %out, i64 %a, i64 %b) nounwind {
45 %cmp = icmp sle i64 %a, %b
46 %result = sext i1 %cmp to i32
47 store i32 %result, ptr addrspace(1) %out, align 4
51 ; GCN-LABEL: {{^}}test_i64_ule:
53 define amdgpu_kernel void @test_i64_ule(ptr addrspace(1) %out, i64 %a, i64 %b) nounwind {
54 %cmp = icmp ule i64 %a, %b
55 %result = sext i1 %cmp to i32
56 store i32 %result, ptr addrspace(1) %out, align 4
60 ; GCN-LABEL: {{^}}test_i64_sgt:
62 define amdgpu_kernel void @test_i64_sgt(ptr addrspace(1) %out, i64 %a, i64 %b) nounwind {
63 %cmp = icmp sgt i64 %a, %b
64 %result = sext i1 %cmp to i32
65 store i32 %result, ptr addrspace(1) %out, align 4
69 ; GCN-LABEL: {{^}}test_i64_ugt:
71 define amdgpu_kernel void @test_i64_ugt(ptr addrspace(1) %out, i64 %a, i64 %b) nounwind {
72 %cmp = icmp ugt i64 %a, %b
73 %result = sext i1 %cmp to i32
74 store i32 %result, ptr addrspace(1) %out, align 4
78 ; GCN-LABEL: {{^}}test_i64_sge:
80 define amdgpu_kernel void @test_i64_sge(ptr addrspace(1) %out, i64 %a, i64 %b) nounwind {
81 %cmp = icmp sge i64 %a, %b
82 %result = sext i1 %cmp to i32
83 store i32 %result, ptr addrspace(1) %out, align 4
87 ; GCN-LABEL: {{^}}test_i64_uge:
89 define amdgpu_kernel void @test_i64_uge(ptr addrspace(1) %out, i64 %a, i64 %b) nounwind {
90 %cmp = icmp uge i64 %a, %b
91 %result = sext i1 %cmp to i32
92 store i32 %result, ptr addrspace(1) %out, align 4