Home | History | Annotate | Download | only in R600
      1 ; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s
      2 
      3 ; SI-LABEL: @test_i64_eq:
      4 ; SI: V_CMP_EQ_I64
      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
      9   ret void
     10 }
     11 
     12 ; SI-LABEL: @test_i64_ne:
     13 ; SI: V_CMP_NE_I64
     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
     18   ret void
     19 }
     20 
     21 ; SI-LABEL: @test_i64_slt:
     22 ; SI: V_CMP_LT_I64
     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
     27   ret void
     28 }
     29 
     30 ; SI-LABEL: @test_i64_ult:
     31 ; SI: V_CMP_LT_U64
     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
     36   ret void
     37 }
     38 
     39 ; SI-LABEL: @test_i64_sle:
     40 ; SI: V_CMP_LE_I64
     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
     45   ret void
     46 }
     47 
     48 ; SI-LABEL: @test_i64_ule:
     49 ; SI: V_CMP_LE_U64
     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
     54   ret void
     55 }
     56 
     57 ; SI-LABEL: @test_i64_sgt:
     58 ; SI: V_CMP_GT_I64
     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
     63   ret void
     64 }
     65 
     66 ; SI-LABEL: @test_i64_ugt:
     67 ; SI: V_CMP_GT_U64
     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
     72   ret void
     73 }
     74 
     75 ; SI-LABEL: @test_i64_sge:
     76 ; SI: V_CMP_GE_I64
     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
     81   ret void
     82 }
     83 
     84 ; SI-LABEL: @test_i64_uge:
     85 ; SI: V_CMP_GE_U64
     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
     90   ret void
     91 }
     92 
     93