[LLVMdev] Instruction Combining Pass *Breaking* Struct Reads?

Nyx mcheva at cs.mcgill.ca
Mon Jun 29 08:32:51 PDT 2009

I just found what the problem was. I was using a different target data for
the optimization passes (creating a new one for the optimization passes) Not
the target data from the execution engine... So the instruction combining
pass was working with erroneous information, since by default it seems to
assume pointers are 64 bits. Problem fixed!

- Max

Eli Friedman-2 wrote:
> On Mon, Jun 29, 2009 at 5:54 AM, Nyx<mcheva at cs.mcgill.ca> wrote:
>> As you can see, I allocate two structs, one taking 16 bytes (containing
>> two
>> i64 values), and one taking 12 bytes (containing a pointer and an i64
>> value,
>> this is on a 32-bit machine)
> Are you sure that's right?  If the target data specifies that a
> pointer is 64 bits or that i64 has an alignment of 64 bits, this code
> is isn't allocating enough space for the struct.
> -Eli
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

View this message in context: http://www.nabble.com/Instruction-Combining-Pass-*Breaking*-Struct-Reads--tp24253572p24256244.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.

More information about the llvm-dev mailing list