forked from OSchip/llvm-project
parent
6f579c12b1
commit
fda3b559e6
|
@ -1373,9 +1373,7 @@ void SROA::ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, uint64_t Offset) {
|
|||
|
||||
if (StoreInst *SI = dyn_cast<StoreInst>(User)) {
|
||||
assert(SI->getOperand(0) != Ptr && "Consistency error!");
|
||||
// FIXME: Remove once builder has Twine API.
|
||||
Value *Old = Builder.CreateLoad(NewAI,
|
||||
(NewAI->getName()+".in").str().c_str());
|
||||
Value *Old = Builder.CreateLoad(NewAI, NewAI->getName()+".in");
|
||||
Value *New = ConvertScalar_InsertValue(SI->getOperand(0), Old, Offset,
|
||||
Builder);
|
||||
Builder.CreateStore(New, NewAI);
|
||||
|
@ -1399,9 +1397,7 @@ void SROA::ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, uint64_t Offset) {
|
|||
for (unsigned i = 1; i != NumBytes; ++i)
|
||||
APVal |= APVal << 8;
|
||||
|
||||
// FIXME: Remove once builder has Twine API.
|
||||
Value *Old = Builder.CreateLoad(NewAI,
|
||||
(NewAI->getName()+".in").str().c_str());
|
||||
Value *Old = Builder.CreateLoad(NewAI, NewAI->getName()+".in");
|
||||
Value *New = ConvertScalar_InsertValue(
|
||||
ConstantInt::get(User->getContext(), APVal),
|
||||
Old, Offset, Builder);
|
||||
|
|
Loading…
Reference in New Issue