Hi,
Does clang generate llvm ir for a 64-bit machine?.
The llvm ir generated for the following c code is
C code
-----------
void foo ( void *addr)
{
unsigned long int area = (unsigned long int) addr;
..............
}
LLVM IR
----------------
%addr.addr = alloca i8*
%area = alloca i32
store i8* %addr, i8** %addr.addr
%tmp = load i8** %addr.addr
%conv = ptrtoint i8* tmp to i32
the pointers are 32bit => clang is not generating code for a 64-bit machine.
Am I missing something?
Shouldn't the llvm ir generated on a 64-bit machine be
%addr.addr = alloc i8*
%area =alloca i64
...........
..............
%conv = ptrtoint i8* tmp to i64
How do I make clang generate the above code?
--
Santosh
_______________________________________________
cfe-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev