Fix a bug in the expansion of EXTRACT_SUBVECTOR in

ExpandExtractFromVectorThroughStack.

llvm-svn: 72351
This commit is contained in:
Eli Friedman 2009-05-23 23:03:28 +00:00
parent 2199ed399f
commit 7badee92ad
1 changed files with 2 additions and 1 deletions

View File

@ -5091,7 +5091,8 @@ SDValue SelectionDAGLegalize::ExpandExtractFromVectorThroughStack(SDValue Op) {
SDValue Ch = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr, NULL, 0);
// Add the offset to the index.
unsigned EltSize = Op.getValueType().getSizeInBits()/8;
unsigned EltSize =
Vec.getValueType().getVectorElementType().getSizeInBits()/8;
Idx = DAG.getNode(ISD::MUL, dl, Idx.getValueType(), Idx,
DAG.getConstant(EltSize, Idx.getValueType()));