<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div style="RIGHT: auto"><SPAN style="RIGHT: auto">I think, finally, I want to conclude on this.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">The problem I see is that if I comment the case for "simplificaiton of bitcast to gep of original struct in instruction combining", wherein there is a case for if the offset by which GEP moves the pointer is non-zero.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">If I disable this code, then structure elements size, I get is</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">--------------------------------------------------------------------------------------------<BR>Type       | struct elements                      | Size in bytes | Correct size in bytes<BR>--------------------------------------------------------------------------------------------<BR>short          nScaleFactors                               <STRONG>4            2<BR></STRONG>FRAME_INFO    
 frameInfo                                  36           36<BR>short          domain_vec[MAX_ENVELOPES]                  10           10<BR>short          domain_vec_noise[MAX_NOISE_ENVELOPES]       6            4<BR>INVF_MODE      sbr_invf_mode[MAX_INVF_BANDS]              20           20<BR>COUPLING_MODE 
 coupling                                    4            4<BR>short          ampResolutionCurrentFrame                   2            2<BR>Flag           addHarmonics[MAX_FREQ_COEFFS]             192          192<BR>short         
 maxQmfSubbandAac                            2            2<BR>short          iEnvelope[MAX_NUM_ENVELOPE_VALUES]        480          480<BR>short          sbrNoiseFloorLevel[MAX_NUM_NOISE_VALUES]   20           20</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"><SPAN style="RIGHT: auto">--------------------------------------------------------------------------------------------</SPAN></SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">Though the size i get is wrong, but still my application passes. I don't have any reason for that though.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN><SPAN style="RIGHT: auto">But, if I enable <STRONG style="RIGHT: auto">this</STRONG> code, then the structure elements size, I get is:</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">--------------------------------------------------------------------------------------------<BR>Type       | struct elements                      | Size in bytes | Correct size in bytes<BR>--------------------------------------------------------------------------------------------<BR>short          nScaleFactors                               2            2<BR>FRAME_INFO    
 frameInfo                                  36           36<BR>short          domain_vec[MAX_ENVELOPES]                  10           10<BR>short          domain_vec_noise[MAX_NOISE_ENVELOPES]       4            4<BR>INVF_MODE      sbr_invf_mode[MAX_INVF_BANDS]              20          
 20<BR>COUPLING_MODE  coupling                                    4            4<BR>short          ampResolutionCurrentFrame                   2            2<BR>Flag           addHarmonics[MAX_FREQ_COEFFS]             192          192<BR>short         
 maxQmfSubbandAac                            2            2<BR>short          iEnvelope[MAX_NUM_ENVELOPE_VALUES]        480          480<BR>short          sbrNoiseFloorLevel[MAX_NUM_NOISE_VALUES]   20           20</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"><SPAN style="RIGHT: auto">--------------------------------------------------------------------------------------------</SPAN></SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN><SPAN style="RIGHT: auto">These sizes are the same as I get with llvm2.9 and which matches with expected/correct as well. For llvm2.9, my test passes as well with these sizes.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">So I wanted to know, if there is a major change in llvm infrastructure required to calculate this offset/size for each structure element or something related to this? </SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">If nothing is changed related to this, i will simply comment out this code, as after commenting, it works for me and forget the problem.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"><VAR id=yui-ie-cursor></VAR>Regards,</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">Pankaj</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><WBR><WBR></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"><WBR>_______________________________________________<WBR>LLVM Developers mailing list<WBR><A href="mailto:LLVMdev@cs.uiuc.edu" ymailto="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</A>        http://llvm.cs.uiuc.edu<WBR>http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev<WBR><WBR><WBR></DIV></DIV></div></body></html>