mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
[opaque pointer type] Track explicit GEP pointee type through in-memory IR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236510 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1602,6 +1602,7 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
|
||||
// is a leading zero) we can fold the cast into this GEP.
|
||||
if (StrippedPtrTy->getAddressSpace() == GEP.getAddressSpace()) {
|
||||
GEP.setOperand(0, StrippedPtr);
|
||||
GEP.setSourceElementType(XATy);
|
||||
return &GEP;
|
||||
}
|
||||
// Cannot replace the base pointer directly because StrippedPtr's
|
||||
|
Reference in New Issue
Block a user