Hi, On Thu, 10 Jan 2013, Eric Botcazou wrote:
> > Going over this what's strange as well is that we adjust MEM_SIZE > > with bitpos, too. At least when the MEM has non-BLKmode this > > means that MEMs mode and MEM_SIZE is inconsistent? Or how do > > a MEMs mode and MEM_SIZE relate? > > Yes, the MEM attributes are incomplete/inconsistent between the call to > set_mem_attributes_minus_bitpos and the subsequent adjustment by bitpos. The problem with this intermediate inconsistency is that ... > That's why only the final result should matter and need be correct. ... this can't be ensured anymore. In some cases the inconsistency between the mem attributes and what XEXP(MEM, 0) represents can't be repaired by the later bitpos adjustments, or better it can be only be repaired by falling back to the conservative side for e.g. the alignment, because we don't store enough information in the mem attributes to recover what was lost. When briefly discussing this yesterday I suggested (without having the code in front of me) that it be best to simply set the mem attributes only at the very end, after having computed to final MEM address including all adjustments, instead of generating wrong mem attributes initially and hoping for the adjustments to make it come out right at the end. Ciao, Michael.