1 ; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s
3 ; SI-LABEL: {{^}}test_i64_eq:
5 define void @test_i64_eq(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
6 %cmp = icmp eq i64 %a, %b
7 %result = sext i1 %cmp to i32
8 store i32 %result, i32 addrspace(1)* %out, align 4
12 ; SI-LABEL: {{^}}test_i64_ne:
14 define void @test_i64_ne(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
15 %cmp = icmp ne i64 %a, %b
16 %result = sext i1 %cmp to i32
17 store i32 %result, i32 addrspace(1)* %out, align 4
21 ; SI-LABEL: {{^}}test_i64_slt:
23 define void @test_i64_slt(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
24 %cmp = icmp slt i64 %a, %b
25 %result = sext i1 %cmp to i32
26 store i32 %result, i32 addrspace(1)* %out, align 4
30 ; SI-LABEL: {{^}}test_i64_ult:
32 define void @test_i64_ult(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
33 %cmp = icmp ult i64 %a, %b
34 %result = sext i1 %cmp to i32
35 store i32 %result, i32 addrspace(1)* %out, align 4
39 ; SI-LABEL: {{^}}test_i64_sle:
41 define void @test_i64_sle(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
42 %cmp = icmp sle i64 %a, %b
43 %result = sext i1 %cmp to i32
44 store i32 %result, i32 addrspace(1)* %out, align 4
48 ; SI-LABEL: {{^}}test_i64_ule:
50 define void @test_i64_ule(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
51 %cmp = icmp ule i64 %a, %b
52 %result = sext i1 %cmp to i32
53 store i32 %result, i32 addrspace(1)* %out, align 4
57 ; SI-LABEL: {{^}}test_i64_sgt:
59 define void @test_i64_sgt(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
60 %cmp = icmp sgt i64 %a, %b
61 %result = sext i1 %cmp to i32
62 store i32 %result, i32 addrspace(1)* %out, align 4
66 ; SI-LABEL: {{^}}test_i64_ugt:
68 define void @test_i64_ugt(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
69 %cmp = icmp ugt i64 %a, %b
70 %result = sext i1 %cmp to i32
71 store i32 %result, i32 addrspace(1)* %out, align 4
75 ; SI-LABEL: {{^}}test_i64_sge:
77 define void @test_i64_sge(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
78 %cmp = icmp sge i64 %a, %b
79 %result = sext i1 %cmp to i32
80 store i32 %result, i32 addrspace(1)* %out, align 4
84 ; SI-LABEL: {{^}}test_i64_uge:
86 define void @test_i64_uge(i32 addrspace(1)* %out, i64 %a, i64 %b) nounwind {
87 %cmp = icmp uge i64 %a, %b
88 %result = sext i1 %cmp to i32
89 store i32 %result, i32 addrspace(1)* %out, align 4