We want to avoid caching llvm::Instruction generated by llvm::ConstantExpr::getAsInstruction into instMap. Because if we remove it right away, it's possible that when getAsInstruction is called again, it will create a new instruction that has the same address with the one we just deleted. Inducing a conflicting index in instMap and triggers an assertion in processInstruction.
Note that this patch depends on D124399 simply because it's easier to trigger this bug by putting ConstantExpr inside a ConstantAggregate, which is also how the test case was written.
Can't we just remove the mapping of i inside of instMap? Wouldn't that make it safe to delete here?