[llvm-commits] [llvm-gcc-4.2] r79597 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Eli Friedman
eli.friedman at gmail.com
Thu Aug 20 23:51:09 PDT 2009
On Thu, Aug 20, 2009 at 11:11 PM, Bill Wendling<isanbard at gmail.com> wrote:
> --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
> +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Fri Aug 21 01:11:55 2009
> @@ -3472,13 +3472,18 @@
> Value *TreeToLLVM::EmitRotateOp(tree exp, unsigned Opc1, unsigned Opc2) {
> Value *In = Emit(TREE_OPERAND(exp, 0), 0);
> Value *Amt = Emit(TREE_OPERAND(exp, 1), 0);
> +
> + if (isa<PointerType>(In->getType()))
> + In = Builder.CreatePtrToInt(In, Amt->getType(),
> + (In->getNameStr()+".cast").c_str());
Umm, I think you want intptr_t rather than the width of the shift amount...
-Eli
More information about the llvm-commits
mailing list