@@ -104,6 +104,72 @@ entry:
104
104
}
105
105
declare <2 x double > @foo ()
106
106
107
+ define i64 @pr150117 (<31 x i8 > %a0 ) nounwind {
108
+ ; X86-LABEL: pr150117:
109
+ ; X86: # %bb.0:
110
+ ; X86-NEXT: pushl %ebx
111
+ ; X86-NEXT: pushl %edi
112
+ ; X86-NEXT: pushl %esi
113
+ ; X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
114
+ ; X86-NEXT: movzbl {{[0-9]+}}(%esp), %ecx
115
+ ; X86-NEXT: movzbl {{[0-9]+}}(%esp), %esi
116
+ ; X86-NEXT: movzbl {{[0-9]+}}(%esp), %edi
117
+ ; X86-NEXT: movzbl {{[0-9]+}}(%esp), %ebx
118
+ ; X86-NEXT: movl {{[0-9]+}}(%esp), %edx
119
+ ; X86-NEXT: shll $8, %edx
120
+ ; X86-NEXT: orl %ebx, %edx
121
+ ; X86-NEXT: shll $8, %edi
122
+ ; X86-NEXT: orl %esi, %edi
123
+ ; X86-NEXT: shll $16, %ecx
124
+ ; X86-NEXT: orl %edi, %ecx
125
+ ; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
126
+ ; X86-NEXT: shll $24, %esi
127
+ ; X86-NEXT: orl %ecx, %esi
128
+ ; X86-NEXT: movd %esi, %xmm0
129
+ ; X86-NEXT: pinsrw $2, %edx, %xmm0
130
+ ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
131
+ ; X86-NEXT: shll $8, %ecx
132
+ ; X86-NEXT: orl %eax, %ecx
133
+ ; X86-NEXT: pinsrw $3, %ecx, %xmm0
134
+ ; X86-NEXT: movd %xmm0, %eax
135
+ ; X86-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
136
+ ; X86-NEXT: movd %xmm0, %edx
137
+ ; X86-NEXT: popl %esi
138
+ ; X86-NEXT: popl %edi
139
+ ; X86-NEXT: popl %ebx
140
+ ; X86-NEXT: retl
141
+ ;
142
+ ; X64-LABEL: pr150117:
143
+ ; X64: # %bb.0:
144
+ ; X64-NEXT: movzbl {{[0-9]+}}(%rsp), %eax
145
+ ; X64-NEXT: movzbl {{[0-9]+}}(%rsp), %ecx
146
+ ; X64-NEXT: movzbl {{[0-9]+}}(%rsp), %edx
147
+ ; X64-NEXT: movzbl {{[0-9]+}}(%rsp), %esi
148
+ ; X64-NEXT: movzbl {{[0-9]+}}(%rsp), %edi
149
+ ; X64-NEXT: movl {{[0-9]+}}(%rsp), %r8d
150
+ ; X64-NEXT: shll $8, %r8d
151
+ ; X64-NEXT: orl %edi, %r8d
152
+ ; X64-NEXT: shll $8, %esi
153
+ ; X64-NEXT: orl %edx, %esi
154
+ ; X64-NEXT: shll $16, %ecx
155
+ ; X64-NEXT: orl %esi, %ecx
156
+ ; X64-NEXT: movl {{[0-9]+}}(%rsp), %edx
157
+ ; X64-NEXT: shll $24, %edx
158
+ ; X64-NEXT: orl %ecx, %edx
159
+ ; X64-NEXT: movd %edx, %xmm0
160
+ ; X64-NEXT: pinsrw $2, %r8d, %xmm0
161
+ ; X64-NEXT: movl {{[0-9]+}}(%rsp), %ecx
162
+ ; X64-NEXT: shll $8, %ecx
163
+ ; X64-NEXT: orl %eax, %ecx
164
+ ; X64-NEXT: pinsrw $3, %ecx, %xmm0
165
+ ; X64-NEXT: movq %xmm0, %rax
166
+ ; X64-NEXT: retq
167
+ %shuffle = shufflevector <31 x i8 > %a0 , <31 x i8 > zeroinitializer , <32 x i32 > <i32 6 , i32 7 , i32 8 , i32 9 , i32 10 , i32 11 , i32 12 , i32 13 , i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
168
+ %bitcast = bitcast <32 x i8 > %shuffle to <4 x i64 >
169
+ %elt = extractelement <4 x i64 > %bitcast , i64 0
170
+ ret i64 %elt
171
+ }
172
+
107
173
; OSS-Fuzz #15662
108
174
; https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15662
109
175
define <4 x i32 > @ossfuzz15662 (ptr %in ) {
0 commit comments