From: Chris Lattner Date: Thu, 7 Jan 2010 01:20:20 +0000 (+0000) Subject: handle ConstantVector while I'm in here. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=4039bd055086ec741132afe32f1ab7fdf5ebd710 handle ConstantVector while I'm in here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92892 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index 294904212e3..ee260e9488e 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -2133,6 +2133,9 @@ static Constant *EvaluateStoreInto(Constant *Init, Constant *Val, if (ConstantArray *CA = dyn_cast(Init)) { for (User::op_iterator i = CA->op_begin(), e = CA->op_end(); i != e; ++i) Elts.push_back(cast(*i)); + } else if (ConstantVector *CV = dyn_cast(Init)) { + for (User::op_iterator i = CV->op_begin(), e = CV->op_end(); i != e; ++i) + Elts.push_back(cast(*i)); } else if (isa(Init)) { Elts.assign(NumElts, Constant::getNullValue(InitTy->getElementType())); } else {