<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><SPAN style="RIGHT: auto">
<DIV style="RIGHT: auto">With reference to the previous query,</DIV>
<DIV style="RIGHT: auto">I think, i miscalculated the offset, just recalculating.</DIV>
<DIV style="RIGHT: auto"> </DIV>
<DIV style="RIGHT: auto">1. without instruction combining</DIV>
<DIV style="RIGHT: auto"><STRONG style="RIGHT: auto">coupling</STRONG> member variable, is at:</DIV>
<DIV style="RIGHT: auto">  <STRONG style="RIGHT: auto">%struct._FRAME_DATA* %2, i32 0, i32 5</STRONG></DIV>
<DIV style="RIGHT: auto"><STRONG style="RIGHT: auto"></STRONG>  where "%2" is defined as:</DIV>
<DIV style="RIGHT: auto">   %arrayidx3 = getelementptr inbounds i16* %Data, i32 <STRONG>1024</STRONG>, !dbg !446<BR>  %2 = bitcast i16* %arrayidx3 to %struct._FRAME_DATA*, !dbg !446</DIV>
<DIV style="RIGHT: auto"> </DIV>
<DIV style="RIGHT: auto">i.e. at 5 offset in FRAME_DATA i.e. the 6th element, i.e. <STRONG>coupling </STRONG>member variable.</DIV>
<DIV style="RIGHT: auto"> </DIV>
<DIV style="RIGHT: auto">i16, i16, i16, [6 x i16], [5 x i16], i16, i16, [3 x i16], [5x i16], [2 x i16], [5 x i32], i32 ,....</DIV>
<DIV style="RIGHT: auto">31 words = 124 bytes.(considering it is aligned to i32)</DIV>
<DIV style="RIGHT: auto"><STRONG style="RIGHT: auto">1024 + 31 = 1055</STRONG> </DIV>
<DIV style="RIGHT: auto"> </DIV>
<DIV style="RIGHT: auto">2. with instruction combining<BR>coupling is at:</DIV>
<DIV style="RIGHT: auto">i16* <STRONG>%timeData, i32</STRONG> <STRONG>1060</STRONG></DIV>
<DIV style="RIGHT: auto">i.e. 1060  offset. </DIV>
<DIV style="RIGHT: auto"> </DIV>
<DIV style="RIGHT: auto">Still the location references by "without instruction combining" is 5 less from with instruction combining.</DIV>
<DIV style="RIGHT: auto"> </DIV>
<DIV style="RIGHT: auto">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. </DIV>
<DIV style="RIGHT: auto"> </DIV>
<DIV style="RIGHT: auto"> </DIV>
<DIV style="RIGHT: auto">Is there any point where I can check for the exact issue? </DIV>
<DIV style="RIGHT: auto"> </DIV>
<DIV style="RIGHT: auto"> </DIV>
<DIV style="RIGHT: auto">Regards,</DIV>
<DIV style="RIGHT: auto">Pankaj</DIV>
<DIV style="RIGHT: auto"> </DIV>
<DIV style="RIGHT: auto"><VAR id=yui-ie-cursor></VAR> </DIV>
<div style="RIGHT: auto"><BR style="RIGHT: auto" class=yui-cursor></SPAN></div>
<div><BR></div>
<DIV style="FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif; FONT-SIZE: 10pt">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV dir=ltr><FONT size=2 face=Arial>
<DIV style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class=hr contentEditable=false readonly="true"></DIV><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Duncan Sands <baldrick@free.fr><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> llvmdev@cs.uiuc.edu <BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Tuesday, April 17, 2012 5:07 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [LLVMdev] Issue with GetElementPtrInst in Instruction Combining pass<BR></FONT></DIV><BR>Hi Pankaj, your best bet is to send the entire bitcode before and after<BR>instcombine runs.<BR><BR>Ciao, Duncan.<BR>_______________________________________________<BR>LLVM Developers mailing list<BR><A href="mailto:LLVMdev@cs.uiuc.edu"
 ymailto="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</A>        http://llvm.cs.uiuc.edu<BR>http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev<BR><BR><BR></DIV></DIV></div></body></html>