On Sun, Feb 5, 2012 at 9:05 PM, Craig Topper <[email protected]> wrote: > Author: ctopper > Date: Sun Feb 5 23:05:50 2012 > New Revision: 149855 > > URL: http://llvm.org/viewvc/llvm-project?rev=149855&view=rev > Log: > Fix vector splat casts to cast element to the appropriate vector element > before inserting into the vector. Fixes PR11930. > > Modified: > cfe/trunk/lib/CodeGen/CGExprScalar.cpp
Testcase, please. -Eli > Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=149855&r1=149854&r2=149855&view=diff > ============================================================================== > --- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original) > +++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Sun Feb 5 23:05:50 2012 > @@ -1190,6 +1190,8 @@ > case CK_VectorSplat: { > llvm::Type *DstTy = ConvertType(DestTy); > Value *Elt = Visit(const_cast<Expr*>(E)); > + Elt = EmitScalarConversion(Elt, E->getType(), > + > DestTy->getAs<VectorType>()->getElementType()); > > // Insert the element in element zero of an undef vector > llvm::Value *UnV = llvm::UndefValue::get(DstTy); > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
