I'm not aware that this does anything significant on its own, but it's
needed for another patch that I'm working on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90864
91177308-0d34-0410-b5e6-
96231b3b80d8
OtherPtr = MTI->getRawDest();
}
}
+
+ // Keep track of the other intrinsic argument, so it can be removed if it
+ // is dead when the intrinsic is replaced.
+ Value *PossiblyDead = OtherPtr;
// If there is an other pointer, we want to convert it to the same pointer
// type as AI has, so we can GEP through it safely.
}
}
MI->eraseFromParent();
+ if (PossiblyDead)
+ RecursivelyDeleteTriviallyDeadInstructions(PossiblyDead);
}
/// RewriteStoreUserOfWholeAlloca - We found a store of an integer that