[LLVMdev] Issue with GetElementPtrInst in Instruction Combining pass

Pankaj Gode godepankaj at yahoo.com
Tue Apr 17 07:21:52 PDT 2012


With reference to the previous query,
I think, i miscalculated the offset, just recalculating.

1. without instruction combining
coupling member variable, is at:
  %struct._FRAME_DATA* %2, i32 0, i32 5
  where "%2" is defined as:
  %arrayidx3 = getelementptr inbounds i16* %Data, i32 1024, !dbg !446
  %2 = bitcast i16* %arrayidx3 to %struct._FRAME_DATA*, !dbg !446

i.e. at 5 offset in FRAME_DATA i.e. the 6th element, i.e. coupling member variable.

i16, i16, i16, [6 x i16], [5 x i16], i16, i16, [3 x i16], [5x i16], [2 x i16], [5 x i32], i32 ,....
31 words = 124 bytes.(considering it is aligned to i32)
1024 + 31 = 1055 

2. with instruction combining
coupling is at:
i16* %timeData, i32 1060
i.e. 1060  offset. 

Still the location references by "without instruction combining" is 5 less from with instruction combining.

Earlier when I was using llvm2.9, instruction combining does not give me any problem.  And similar code is generated as with llvm 3.0 instruction combining. 


Is there any point where I can check for the exact issue? 


Regards,
Pankaj

 



________________________________
From: Duncan Sands <baldrick at free.fr>
To: llvmdev at cs.uiuc.edu 
Sent: Tuesday, April 17, 2012 5:07 PM
Subject: Re: [LLVMdev] Issue with GetElementPtrInst in Instruction Combining pass

Hi Pankaj, your best bet is to send the entire bitcode before and after
instcombine runs.

Ciao, Duncan.
_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu        http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120417/3e30a4ef/attachment.html>


More information about the llvm-dev mailing list