1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-unknown | FileCheck %s --check-prefixes=X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefixes=X64
5 define i32 @i32_zext_shift_i16_zext_i1(i1 %a0) nounwind {
6 ; X86-LABEL: i32_zext_shift_i16_zext_i1:
8 ; X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
9 ; X86-NEXT: andl $1, %eax
10 ; X86-NEXT: shll $5, %eax
13 ; X64-LABEL: i32_zext_shift_i16_zext_i1:
15 ; X64-NEXT: movl %edi, %eax
16 ; X64-NEXT: andl $1, %eax
17 ; X64-NEXT: shll $5, %eax
19 %t0 = zext i1 %a0 to i16
21 %t2 = zext i16 %t1 to i32
25 define i32 @i32_zext_shift_i16_zext_i8(i8 %a0) nounwind {
26 ; X86-LABEL: i32_zext_shift_i16_zext_i8:
28 ; X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
29 ; X86-NEXT: shll $5, %eax
32 ; X64-LABEL: i32_zext_shift_i16_zext_i8:
34 ; X64-NEXT: movzbl %dil, %eax
35 ; X64-NEXT: shll $5, %eax
37 %t0 = zext i8 %a0 to i16
39 %t2 = zext i16 %t1 to i32
43 define i64 @i64_zext_shift_i16_zext_i8(i8 %a0) nounwind {
44 ; X86-LABEL: i64_zext_shift_i16_zext_i8:
46 ; X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
47 ; X86-NEXT: shll $5, %eax
48 ; X86-NEXT: xorl %edx, %edx
51 ; X64-LABEL: i64_zext_shift_i16_zext_i8:
53 ; X64-NEXT: movzbl %dil, %eax
54 ; X64-NEXT: shll $5, %eax
56 %t0 = zext i8 %a0 to i16
58 %t2 = zext i16 %t1 to i64
62 define i64 @i64_zext_shift_i32_zext_i8(i8 %a0) nounwind {
63 ; X86-LABEL: i64_zext_shift_i32_zext_i8:
65 ; X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
66 ; X86-NEXT: shll $3, %eax
67 ; X86-NEXT: xorl %edx, %edx
70 ; X64-LABEL: i64_zext_shift_i32_zext_i8:
72 ; X64-NEXT: movzbl %dil, %eax
73 ; X64-NEXT: shll $3, %eax
75 %t0 = zext i8 %a0 to i32
77 %t2 = zext i32 %t1 to i64
81 define i64 @i64_zext_shift_i32_zext_i16(i16 %a0) nounwind {
82 ; X86-LABEL: i64_zext_shift_i32_zext_i16:
84 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
85 ; X86-NEXT: shll $5, %eax
86 ; X86-NEXT: xorl %edx, %edx
89 ; X64-LABEL: i64_zext_shift_i32_zext_i16:
91 ; X64-NEXT: movzwl %di, %eax
92 ; X64-NEXT: shll $5, %eax
94 %t0 = zext i16 %a0 to i32
96 %t2 = zext i32 %t1 to i64
100 define i128 @i128_zext_shift_i64_zext_i8(i8 %a0) nounwind {
101 ; X86-LABEL: i128_zext_shift_i64_zext_i8:
103 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
104 ; X86-NEXT: movzbl {{[0-9]+}}(%esp), %ecx
105 ; X86-NEXT: shll $4, %ecx
106 ; X86-NEXT: movl %ecx, (%eax)
107 ; X86-NEXT: movl $0, 12(%eax)
108 ; X86-NEXT: movl $0, 8(%eax)
109 ; X86-NEXT: movl $0, 4(%eax)
112 ; X64-LABEL: i128_zext_shift_i64_zext_i8:
114 ; X64-NEXT: movzbl %dil, %eax
115 ; X64-NEXT: shll $4, %eax
116 ; X64-NEXT: xorl %edx, %edx
118 %t0 = zext i8 %a0 to i64
120 %t2 = zext i64 %t1 to i128
124 define i128 @i128_zext_shift_i64_zext_i16(i16 %a0) nounwind {
125 ; X86-LABEL: i128_zext_shift_i64_zext_i16:
127 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
128 ; X86-NEXT: movzwl {{[0-9]+}}(%esp), %ecx
129 ; X86-NEXT: shll $7, %ecx
130 ; X86-NEXT: movl %ecx, (%eax)
131 ; X86-NEXT: movl $0, 12(%eax)
132 ; X86-NEXT: movl $0, 8(%eax)
133 ; X86-NEXT: movl $0, 4(%eax)
136 ; X64-LABEL: i128_zext_shift_i64_zext_i16:
138 ; X64-NEXT: movzwl %di, %eax
139 ; X64-NEXT: shll $7, %eax
140 ; X64-NEXT: xorl %edx, %edx
142 %t0 = zext i16 %a0 to i64
144 %t2 = zext i64 %t1 to i128