1 ; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s
2 ; RUN: llc -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s
4 ; SI-LABEL: {{^}}test_i64_eq:
6 define amdgpu_kernel void @test_i64_eq(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
7 %cmp = icmp eq i64 %a, %b
8 %result = sext i1 %cmp to i32
9 store i32 %result, i32 addrspace(1)* %out, align 4
13 ; SI-LABEL: {{^}}test_i64_ne:
15 define amdgpu_kernel void @test_i64_ne(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
16 %cmp = icmp ne i64 %a, %b
17 %result = sext i1 %cmp to i32
18 store i32 %result, i32 addrspace(1)* %out, align 4
22 ; SI-LABEL: {{^}}test_i64_slt:
24 define amdgpu_kernel void @test_i64_slt(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
25 %cmp = icmp slt i64 %a, %b
26 %result = sext i1 %cmp to i32
27 store i32 %result, i32 addrspace(1)* %out, align 4
31 ; SI-LABEL: {{^}}test_i64_ult:
33 define amdgpu_kernel void @test_i64_ult(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
34 %cmp = icmp ult i64 %a, %b
35 %result = sext i1 %cmp to i32
36 store i32 %result, i32 addrspace(1)* %out, align 4
40 ; SI-LABEL: {{^}}test_i64_sle:
42 define amdgpu_kernel void @test_i64_sle(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
43 %cmp = icmp sle i64 %a, %b
44 %result = sext i1 %cmp to i32
45 store i32 %result, i32 addrspace(1)* %out, align 4
49 ; SI-LABEL: {{^}}test_i64_ule:
51 define amdgpu_kernel void @test_i64_ule(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
52 %cmp = icmp ule i64 %a, %b
53 %result = sext i1 %cmp to i32
54 store i32 %result, i32 addrspace(1)* %out, align 4
58 ; SI-LABEL: {{^}}test_i64_sgt:
60 define amdgpu_kernel void @test_i64_sgt(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
61 %cmp = icmp sgt i64 %a, %b
62 %result = sext i1 %cmp to i32
63 store i32 %result, i32 addrspace(1)* %out, align 4
67 ; SI-LABEL: {{^}}test_i64_ugt:
69 define amdgpu_kernel void @test_i64_ugt(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
70 %cmp = icmp ugt i64 %a, %b
71 %result = sext i1 %cmp to i32
72 store i32 %result, i32 addrspace(1)* %out, align 4
76 ; SI-LABEL: {{^}}test_i64_sge:
78 define amdgpu_kernel void @test_i64_sge(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
79 %cmp = icmp sge i64 %a, %b
80 %result = sext i1 %cmp to i32
81 store i32 %result, i32 addrspace(1)* %out, align 4
85 ; SI-LABEL: {{^}}test_i64_uge:
87 define amdgpu_kernel void @test_i64_uge(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
88 %cmp = icmp uge i64 %a, %b
89 %result = sext i1 %cmp to i32
90 store i32 %result, i32 addrspace(1)* %out, align 4