Lines Matching refs:OuterCast
19 AddrSpaceCastInst *OuterCast; member
27 auto *OuterCast = dyn_cast<AddrSpaceCastInst>(I); in match() local
28 if (!OuterCast) in match()
30 auto *GEP = dyn_cast<GetElementPtrInst>(OuterCast->getPointerOperand()); in match()
36 if (InnerCast->getSrcAddressSpace() != OuterCast->getDestAddressSpace()) in match()
38 if (InnerCast->getDestAddressSpace() != OuterCast->getSrcAddressSpace()) in match()
40 return CastGEPCast{OuterCast}; in match()
52 auto *GEP = cast<GetElementPtrInst>(OuterCast->getPointerOperand()); in rewrite()
54 unsigned AS = OuterCast->getDestAddressSpace(); in rewrite()
57 NewGEP->insertAfter(OuterCast); in rewrite()
61 OuterCast->replaceAllUsesWith(NewGEP); in rewrite()
62 OuterCast->eraseFromParent(); in rewrite()