1 ; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s
3 ; SI-LABEL: @s_sext_i1_to_i32:
4 ; SI: V_CNDMASK_B32_e64
6 define void @s_sext_i1_to_i32(i32 addrspace(1)* %out, i32 %a, i32 %b) nounwind {
7 %cmp = icmp eq i32 %a, %b
8 %sext = sext i1 %cmp to i32
9 store i32 %sext, i32 addrspace(1)* %out, align 4
16 define void @test(i64 addrspace(1)* %out, i32 %a, i32 %b, i32 %c) nounwind {
19 %add = add i32 %mul, %c
20 %sext = sext i32 %add to i64
21 store i64 %sext, i64 addrspace(1)* %out, align 8
25 ; SI-LABEL: @s_sext_i1_to_i64:
26 ; SI: V_CNDMASK_B32_e64
27 ; SI: V_CNDMASK_B32_e64
29 define void @s_sext_i1_to_i64(i64 addrspace(1)* %out, i32 %a, i32 %b) nounwind {
30 %cmp = icmp eq i32 %a, %b
31 %sext = sext i1 %cmp to i64
32 store i64 %sext, i64 addrspace(1)* %out, align 8
36 ; SI-LABEL: @s_sext_i32_to_i64:
39 define void @s_sext_i32_to_i64(i64 addrspace(1)* %out, i32 %a) nounwind {
40 %sext = sext i32 %a to i64
41 store i64 %sext, i64 addrspace(1)* %out, align 8
45 ; SI-LABEL: @v_sext_i32_to_i64:
48 define void @v_sext_i32_to_i64(i64 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
49 %val = load i32 addrspace(1)* %in, align 4
50 %sext = sext i32 %val to i64
51 store i64 %sext, i64 addrspace(1)* %out, align 8
55 ; SI-LABEL: @s_sext_i16_to_i64:
57 define void @s_sext_i16_to_i64(i64 addrspace(1)* %out, i16 %a) nounwind {
58 %sext = sext i16 %a to i64
59 store i64 %sext, i64 addrspace(1)* %out, align 8