The llvm-gcc part looks good, but you might as well do this for the future: Instead of: @@ -1723,7 +1728,8 @@ } Value *ShAmt = ConstantInt::get(Type::UByteTy, ValSizeInBits-LV.BitSize); - Val = new ShiftInst(Instruction::Shr, Val, ShAmt, "tmp", CurBB); + Val = new ShiftInst(Val->getType()->isSigned() ? + Instruction::AShr : Instruction::LShr, Val, ShAmt, "tmp", CurBB); } return CastToType(Val, ConvertType(TREE_TYPE(exp))); Select AShr or LShr based on TYPE_UNSIGNED(TREE_TYPE(exp)) instead of getType()->isSigned(). When you eliminate signedness you'll have to do this anyway. -Chris |
_______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits