- if (Instruction *Other = dyn_cast<Instruction>(*UI))
- // Check to see if this new cast is not I, but has the same operand...
- if (Other != &I && Other->getOpcode() == I.getOpcode() &&
- Other->getOperand(0) == Op && // Is the operand the same?
- // Is it embeded in the same function? (This could be false if LHS
+ if (CastInst *Other = dyn_cast<CastInst>(*UI))
+ // Check that the types are the same, since this code handles casts...
+ if (Other->getType() == I.getType() &&
+ // Is it embedded in the same function? (This could be false if LHS