We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf9584b commit 12b78dbCopy full SHA for 12b78db
llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
@@ -103,7 +103,10 @@ bool IPCP::processFunction(Function &F) {
103
// Do we have a constant argument!?
104
if (!ArgumentConstants[i].second) {
105
assert(ArgumentConstants[i].first && "Unknown constant value!");
106
- AI->replaceAllUsesWith(ArgumentConstants[i].first);
+ Value *V = ArgumentConstants[i].first;
107
+ if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(V))
108
+ V = CPR->getValue();
109
+ AI->replaceAllUsesWith(V);
110
++NumArgumentsProped;
111
}
112
return true;
0 commit comments