mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Revert r235451 since it is attached to a wrong Differential Revision. Sorry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235453 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1467,11 +1467,6 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
|
||||
// normalized.
|
||||
if (SO1->getType() != GO1->getType())
|
||||
return nullptr;
|
||||
// Only do the combine when GO1 and SO1 are both constants. Only in
|
||||
// this case, we are sure the cost after the merge is never more than
|
||||
// that before the merge.
|
||||
if (!isa<Constant>(GO1) || !isa<Constant>(SO1))
|
||||
return nullptr;
|
||||
Sum = Builder->CreateAdd(SO1, GO1, PtrOp->getName()+".sum");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user