1; RUN: llc -mtriple=x86_64-unknown-unknown < %s | FileCheck %s
2
3; CHECK-LABEL: int32_float_pair
4; CHECK: movl %edi, (%rsi)
5; CHECK: movss %xmm0, 4(%rsi)
6define void @int32_float_pair(i32 %tmp1, float %tmp2, i64* %ref.tmp) {
7entry:
8  %t0 = bitcast float %tmp2 to i32
9  %t1 = zext i32 %t0 to i64
10  %t2 = shl nuw i64 %t1, 32
11  %t3 = zext i32 %tmp1 to i64
12  %t4 = or i64 %t2, %t3
13  store i64 %t4, i64* %ref.tmp, align 8
14  ret void
15}
16
17; CHECK-LABEL: float_int32_pair
18; CHECK: movss %xmm0, (%rsi)
19; CHECK: movl %edi, 4(%rsi)
20define void @float_int32_pair(float %tmp1, i32 %tmp2, i64* %ref.tmp) {
21entry:
22  %t0 = bitcast float %tmp1 to i32
23  %t1 = zext i32 %tmp2 to i64
24  %t2 = shl nuw i64 %t1, 32
25  %t3 = zext i32 %t0 to i64
26  %t4 = or i64 %t2, %t3
27  store i64 %t4, i64* %ref.tmp, align 8
28  ret void
29}
30
31; CHECK-LABEL: int16_float_pair
32; CHECK: movzwl	%di, %eax
33; CHECK: movl %eax, (%rsi)
34; CHECK: movss %xmm0, 4(%rsi)
35define void @int16_float_pair(i16 signext %tmp1, float %tmp2, i64* %ref.tmp) {
36entry:
37  %t0 = bitcast float %tmp2 to i32
38  %t1 = zext i32 %t0 to i64
39  %t2 = shl nuw i64 %t1, 32
40  %t3 = zext i16 %tmp1 to i64
41  %t4 = or i64 %t2, %t3
42  store i64 %t4, i64* %ref.tmp, align 8
43  ret void
44}
45
46; CHECK-LABEL: int8_float_pair
47; CHECK: movzbl	%dil, %eax
48; CHECK: movl %eax, (%rsi)
49; CHECK: movss %xmm0, 4(%rsi)
50define void @int8_float_pair(i8 signext %tmp1, float %tmp2, i64* %ref.tmp) {
51entry:
52  %t0 = bitcast float %tmp2 to i32
53  %t1 = zext i32 %t0 to i64
54  %t2 = shl nuw i64 %t1, 32
55  %t3 = zext i8 %tmp1 to i64
56  %t4 = or i64 %t2, %t3
57  store i64 %t4, i64* %ref.tmp, align 8
58  ret void
59}
60