Skip to content

Commit 79c3ce2

Browse files
committed
remove dead code
1 parent a2b4bb7 commit 79c3ce2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,8 @@ static Value *rewriteGEPAsOffset(Value *Start, Value *Base,
541541
// 3. Add the edges for the PHI nodes.
542542
// 4. Emit GEPs to get the original pointers.
543543
// 5. Remove the original instructions.
544-
uint64_t IndexSize = DL.getIndexTypeSizeInBits(Start->getType());
545-
Type *IndexType = IntegerType::get(Base->getContext(), IndexSize);
544+
Type *IndexType = IntegerType::get(
545+
Base->getContext(), DL.getIndexTypeSizeInBits(Start->getType()));
546546

547547
DenseMap<Value *, Value *> NewInsts;
548548
NewInsts[Base] = ConstantInt::getNullValue(IndexType);
@@ -565,10 +565,6 @@ static Value *rewriteGEPAsOffset(Value *Start, Value *Base,
565565
continue;
566566

567567
if (auto *GEP = dyn_cast<GEPOperator>(Val)) {
568-
APInt Offset(IndexSize, 0);
569-
MapVector<Value *, APInt> VarOffsets;
570-
GEP->collectOffset(DL, IndexSize, VarOffsets, Offset);
571-
572568
setInsertionPoint(Builder, GEP);
573569
Value *Op = NewInsts[GEP->getOperand(0)];
574570
Value *OffsetV = emitGEPOffset(&Builder, DL, GEP);

0 commit comments

Comments
 (0)