<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><DIV> As the function DecomposeGEPExpression said,if const Value V is a symbolic pointer expression, decompose it into a base pointer with a constant offset and a number of scaled symbolic offsets.</DIV>
<DIV>Usually it is right,but once in 32bit poiter,and the offset is 0x80000000(0x80000000+0x80000000),</DIV>
<DIV>the result sounds not right.<BR> In my case,the IR series like this:<BR> getelementptr<BR> ...<BR> %a.sroa.0.0.idx= getelementptr inbouds[1x%union.int_union]*a,i32 -13421778,i32 -13421778<BR> ...</DIV>
<DIV> As the result,the BaseOffs is -13421778(0x80000000) + -13421778(0x80000000)=0x100000000.</DIV>
<DIV>They point to different addresses,so there isn't alias between them.But in actual situation,for 32bit </DIV>
<DIV>target(such as i586),0x100000000 is overflow,the actual result is -13421778(0x80000000) + </DIV>
<DIV>-13421778(0x80000000)=0.<BR> I try to trunk BaseOffs for 32bit target like this,am i right?<BR>+ if(TD->getPoitersizeInBits() == 32)<BR>+ BaseOffs = (int32_t) BaseOffs;</DIV>
<DIV>I would appreciate any suggestions on this.Thanks very much!</DIV></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>