mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Replace CastInst::createInferredCast calls with more accurate cast
creation calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32521 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -258,8 +258,8 @@ bool RPR::PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) {
|
||||
// The existing and new operand 0 types are different so we must
|
||||
// replace CI with a new CastInst so that we are assured to
|
||||
// get the correct cast opcode.
|
||||
CastInst *NewCI = CastInst::createInferredCast(
|
||||
GEP, CI->getType(), CI->getName(), CI);
|
||||
CastInst *NewCI = new BitCastInst(GEP, CI->getType(),
|
||||
CI->getName(), CI);
|
||||
CI->replaceAllUsesWith(NewCI);
|
||||
CI->eraseFromParent();
|
||||
CI = NewCI;
|
||||
|
Reference in New Issue
Block a user