llvm.org GIT mirror llvm / be444ed
Fix a bug in getCopyFromParts turned up in the testcase for PR1132. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40598 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 12 years ago
3 changed file(s) with 49 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
694694 } else if (NumParts > 0) {
695695 // If the intermediate type was expanded, build the intermediate operands
696696 // from the parts.
697 assert(NumIntermediates % NumParts == 0 &&
697 assert(NumParts % NumIntermediates == 0 &&
698698 "Must expand into a divisible number of parts!");
699 unsigned Factor = NumIntermediates / NumParts;
699 unsigned Factor = NumParts / NumIntermediates;
700700 for (unsigned i = 0; i != NumIntermediates; ++i)
701701 Ops[i] = getCopyFromParts(DAG, &Parts[i * Factor], Factor,
702702 PartVT, IntermediateVT);
707707 return DAG.getNode(MVT::isVector(IntermediateVT) ?
708708 ISD::CONCAT_VECTORS :
709709 ISD::BUILD_VECTOR,
710 ValueVT, &Ops[0], NumParts);
710 ValueVT, &Ops[0], NumIntermediates);
711711 }
712712
713713 /// getCopyToParts - Create a series of nodes that contain the
0 ; RUN: llvm-as < %s | llc -mtriple=alphaev6-unknown-linux-gnu
1
2 define void @foo() {
3 entry:
4 br label %bb
5
6 bb: ; preds = %bb, %entry
7 br i1 false, label %bb26, label %bb
8
9 bb19: ; preds = %bb26
10 ret void
11
12 bb26: ; preds = %bb
13 br i1 false, label %bb30, label %bb19
14
15 bb30: ; preds = %bb26
16 br label %bb45
17
18 bb45: ; preds = %bb45, %bb30
19 %V.0 = phi <8 x i16> [ %tmp42, %bb45 ], [ zeroinitializer, %bb30 ] ; <<8 x i16>> [#uses=1]
20 %tmp42 = mul <8 x i16> zeroinitializer, %V.0 ; <<8 x i16>> [#uses=1]
21 br label %bb45
22 }
0 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g3
1
2 define void @foo() {
3 entry:
4 br label %bb
5
6 bb: ; preds = %bb, %entry
7 br i1 false, label %bb26, label %bb
8
9 bb19: ; preds = %bb26
10 ret void
11
12 bb26: ; preds = %bb
13 br i1 false, label %bb30, label %bb19
14
15 bb30: ; preds = %bb26
16 br label %bb45
17
18 bb45: ; preds = %bb45, %bb30
19 %V.0 = phi <8 x i16> [ %tmp42, %bb45 ], [ zeroinitializer, %bb30 ] ; <<8 x i16>> [#uses=1]
20 %tmp42 = mul <8 x i16> zeroinitializer, %V.0 ; <<8 x i16>> [#uses=1]
21 br label %bb45
22 }