[llvm-commits] [llvm] r92892 - /llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
Chris Lattner
sabre at nondot.org
Wed Jan 6 17:20:20 PST 2010
Author: lattner
Date: Wed Jan 6 19:20:20 2010
New Revision: 92892
URL: http://llvm.org/viewvc/llvm-project?rev=92892&view=rev
Log:
handle ConstantVector while I'm in here.
Modified:
llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp?rev=92892&r1=92891&r2=92892&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Wed Jan 6 19:20:20 2010
@@ -2133,6 +2133,9 @@
if (ConstantArray *CA = dyn_cast<ConstantArray>(Init)) {
for (User::op_iterator i = CA->op_begin(), e = CA->op_end(); i != e; ++i)
Elts.push_back(cast<Constant>(*i));
+ } else if (ConstantVector *CV = dyn_cast<ConstantVector>(Init)) {
+ for (User::op_iterator i = CV->op_begin(), e = CV->op_end(); i != e; ++i)
+ Elts.push_back(cast<Constant>(*i));
} else if (isa<ConstantAggregateZero>(Init)) {
Elts.assign(NumElts, Constant::getNullValue(InitTy->getElementType()));
} else {
More information about the llvm-commits
mailing list