[LLVMdev] LongTy in LowerInvoke.cpp

Chris Lattner sabre at nondot.org
Fri May 13 08:29:16 PDT 2005


On Fri, 13 May 2005, Andrew Lenharth wrote:
> On Fri, 2005-05-13 at 08:06 +0200, Markus F.X.J. Oberhumer wrote:
>> Actually that's the only case I stumbled over this problem in a somewhat
>> larger C++ program, and it's clearly the wrong type in LowerInvoke.cpp -
>> it really should be IntPtrTy. But maybe we could use just IntTy here to
>> avoid target dependencies.
>
> Wait a minute.  You want to lower a 64 bit thing to a 32 bit and "avoid
> target dependencies" when the right type is a pointer?  You know the
> 64-bit targets won't like this one bit.

The code is fine, 64-bit targets support 32-bit gep offsets just like 
32-bit targets support 64-bit offsets.  We're talking about the constant 
zero here, so there are no bits to lose.  See LangRef.html for more info.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/




More information about the llvm-dev mailing list