File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,8 @@ bool ISD::isScalarToVector(const SDNode *N) {
199
199
if (N->getOperand (0 ).getOpcode () == ISD::UNDEF)
200
200
return false ;
201
201
unsigned NumElems = N->getNumOperands ();
202
+ if (NumElems == 1 )
203
+ return false ;
202
204
for (unsigned i = 1 ; i < NumElems; ++i) {
203
205
SDValue V = N->getOperand (i);
204
206
if (V.getOpcode () != ISD::UNDEF)
Original file line number Diff line number Diff line change
1
+ ; RUN: llc < %s -march=x86-64 -mattr=+sse42 -disable-mmx | FileCheck %s
2
+
3
+
4
+ define float @extractFloat1 () nounwind {
5
+ entry:
6
+ ; CHECK: 1065353216
7
+ %tmp0 = bitcast <1 x double > <double 0x000000003F800000 > to <2 x float >
8
+ %tmp1 = extractelement <2 x float > %tmp0 , i32 0
9
+ ret float %tmp1
10
+ }
11
+
12
+ define float @extractFloat2 () nounwind {
13
+ entry:
14
+ ; CHECK: pxor %xmm0, %xmm0
15
+ %tmp4 = bitcast <1 x double > <double 0x000000003F800000 > to <2 x float >
16
+ %tmp5 = extractelement <2 x float > %tmp4 , i32 1
17
+ ret float %tmp5
18
+ }
19
+
20
+ define i32 @extractInt2 () nounwind {
21
+ entry:
22
+ ; CHECK: xorl %eax, %eax
23
+ %tmp4 = bitcast <1 x i64 > <i64 256 > to <2 x i32 >
24
+ %tmp5 = extractelement <2 x i32 > %tmp4 , i32 1
25
+ ret i32 %tmp5
26
+ }
27
+
You can’t perform that action at this time.
0 commit comments