Eliminate narrowing conversion in initializer list, to make C++11 happy

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149254 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Douglas Gregor 2012-01-30 16:57:18 +00:00
parent 9c68354956
commit b2f1b5028c

View File

@ -5294,8 +5294,8 @@ X86TargetLowering::LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const {
int MaskVec[] = {
Reverse1 ? 1 : 0,
Reverse1 ? 0 : 1,
Reverse2 ? 1-NumElems : NumElems,
Reverse2 ? NumElems : 1+NumElems
static_cast<int>(Reverse2 ? 1-NumElems : NumElems),
static_cast<int>(Reverse2 ? NumElems : 1+NumElems)
};
return DAG.getVectorShuffle(VT, dl, V[0], V[1], &MaskVec[0]);
}