mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
cleanup/simplify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80706 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2af658fcc0
commit
7c8c1ba40c
@ -331,9 +331,8 @@ CallGraphNode *SRETPromotion::updateCallSites(Function *F, Function *NF) {
|
||||
if (C2 && (C2 == Call))
|
||||
continue;
|
||||
|
||||
if (GetElementPtrInst *UGEP = dyn_cast<GetElementPtrInst>(U2)) {
|
||||
ConstantInt *Idx = dyn_cast<ConstantInt>(UGEP->getOperand(2));
|
||||
assert (Idx && "Unexpected getelementptr index!");
|
||||
GetElementPtrInst *UGEP = cast<GetElementPtrInst>(U2);
|
||||
ConstantInt *Idx = cast<ConstantInt>(UGEP->getOperand(2));
|
||||
Value *GR = ExtractValueInst::Create(New, Idx->getZExtValue(),
|
||||
"evi", UGEP);
|
||||
while(!UGEP->use_empty()) {
|
||||
@ -346,9 +345,6 @@ CallGraphNode *SRETPromotion::updateCallSites(Function *F, Function *NF) {
|
||||
UGEP->eraseFromParent();
|
||||
continue;
|
||||
}
|
||||
|
||||
assert(0 && "Unexpected sret parameter use");
|
||||
}
|
||||
Call->eraseFromParent();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user