[llvm-branch-commits] [llvm-gcc-branch] r79599 - /llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/llvm-convert.cpp
Bill Wendling
isanbard at gmail.com
Thu Aug 20 23:14:18 PDT 2009
Author: void
Date: Fri Aug 21 01:14:18 2009
New Revision: 79599
URL: http://llvm.org/viewvc/llvm-project?rev=79599&view=rev
Log:
--- Merging r79597 into '.':
U gcc/llvm-convert.cpp
Modified:
llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/llvm-convert.cpp?rev=79599&r1=79598&r2=79599&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/llvm-convert.cpp Fri Aug 21 01:14:18 2009
@@ -3317,6 +3317,11 @@
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());
+
if (Amt->getType() != In->getType())
Amt = Builder.CreateIntCast(Amt, In->getType(), false,
(Amt->getName()+".cast").c_str());
More information about the llvm-branch-commits
mailing list