llvm.org GIT mirror llvm / 2e56dd8
We might as well strip off any CPRs before propagation git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9437 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 16 years ago
1 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
102102 // Do we have a constant argument!?
103103 if (!ArgumentConstants[i].second) {
104104 assert(ArgumentConstants[i].first && "Unknown constant value!");
105 AI->replaceAllUsesWith(ArgumentConstants[i].first);
105 Value *V = ArgumentConstants[i].first;
106 if (ConstantPointerRef *CPR = dyn_cast(V))
107 V = CPR->getValue();
108 AI->replaceAllUsesWith(V);
106109 ++NumArgumentsProped;
107110 }
108111 return true;