On Nov 7, 2006, at 9:20 PM, Reid Spencer wrote: >> Op = InsertNewInstBefore(new CastInst(Op, I.getType(), >> "tmp"), I); >> - return new ShiftInst(I.getOpcode(), Op, >> + ShiftInst* ShiftResult = new ShiftInst(I.getOpcode(), Op, >> ConstantInt::get(Type::UByteTy, Amt)); >> + if (I.getType() == ShiftResult->getType()) >> + return ShiftResult; >> + InsertNewInstBefore(ShiftResult, I); >> + return new CastInst(ShiftResult, I.getType()); >> } >> >> Why do you need the two casts? If you don't, please remove them. > > That's the one that causes InstCombiner's replaceAllUsesWith call to > assert because its the wrong type. This is specifically the one I > warned you about :) > > If you can see a way to eliminate it, please feel free after I commit > it. We already tried and it breaks.
Fair enough. Thanks, -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits