[cfe-commits] r92057 - /cfe/trunk/lib/CodeGen/CGExpr.cpp
Chris Lattner
sabre at nondot.org
Wed Dec 23 13:33:41 PST 2009
Author: lattner
Date: Wed Dec 23 15:33:41 2009
New Revision: 92057
URL: http://llvm.org/viewvc/llvm-project?rev=92057&view=rev
Log:
simplify my previous patch.
Modified:
cfe/trunk/lib/CodeGen/CGExpr.cpp
Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=92057&r1=92056&r2=92057&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Wed Dec 23 15:33:41 2009
@@ -1215,17 +1215,10 @@
assert(VT && "Result must be a vector");
llvm::Value *Vec = EmitScalarExpr(E->getBase());
- // Store the vector to memory (because LValue wants an address) and use an
- // index list of 0,1,2,3 which is the full vector.
+ // Store the vector to memory (because LValue wants an address).
llvm::Value *VecMem =CreateTempAlloca(ConvertType(E->getBase()->getType()));
Builder.CreateStore(Vec, VecMem);
-
- llvm::SmallVector<llvm::Constant *, 4> CElts;
- for (unsigned i = 0, e = VT->getNumElements(); i != e; ++i)
- CElts.push_back(llvm::ConstantInt::get(Int32Ty, i));
-
- llvm::Constant *Elts = llvm::ConstantVector::get(&CElts[0], CElts.size());
- Base = LValue::MakeExtVectorElt(VecMem, Elts, 0);
+ Base = LValue::MakeAddr(VecMem, Qualifiers());
}
// Encode the element access list into a vector of unsigned indices.
More information about the cfe-commits
mailing list