forked from OSchip/llvm-project
getelementptr instruction, support index vector of EVT.
Differential Revision: http://reviews.llvm.org/D19775 llvm-svn: 268195
This commit is contained in:
parent
cdbc450ad6
commit
110af565c7
|
@ -3245,7 +3245,8 @@ void SelectionDAGBuilder::visitGetElementPtr(const User &I) {
|
|||
cast<VectorType>(I.getType())->getVectorNumElements() : 0;
|
||||
|
||||
if (VectorWidth && !N.getValueType().isVector()) {
|
||||
MVT VT = MVT::getVectorVT(N.getValueType().getSimpleVT(), VectorWidth);
|
||||
LLVMContext &Context = *DAG.getContext();
|
||||
EVT VT = EVT::getVectorVT(Context, N.getValueType(), VectorWidth);
|
||||
SmallVector<SDValue, 16> Ops(VectorWidth, N);
|
||||
N = DAG.getNode(ISD::BUILD_VECTOR, dl, VT, Ops);
|
||||
}
|
||||
|
|
|
@ -114,3 +114,12 @@ entry:
|
|||
ret <4 x i16*> %A
|
||||
;CHECK: ret
|
||||
}
|
||||
|
||||
;CHECK-LABEL: AGEP9:
|
||||
define <64 x i16*> @AGEP9(i16* %param, <64 x i32> %off) nounwind {
|
||||
entry:
|
||||
;CHECK: vbroadcastss
|
||||
%A = getelementptr i16, i16* %param, <64 x i32> %off
|
||||
ret <64 x i16*> %A
|
||||
;CHECK: ret
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue