On 07/28/2011 12:59 AM, H.J. Lu wrote:
> Regarding correctness: you're converting a SImode operation to DImode by > "pushing in" the zero_extend operation. What makes you think that base + > constant offset won't overflow in any case?
You have not answered this.
> And also: what are you gaining by allowing the wrap around? I don't need to > know what ignore_address_wrap_around does, I need to know _why_ it is > necessary. We have (zero_extend:DI (plus:SI (FOO:SI) (const_int Y))) I want to convert it to (plus:DI (zero_extend:DI (FOO:SI)) (const_int Y)) There is no zero-extend on (const_int Y). if FOO == 0xfffffffc and Y = 8, (zero_extend:DI (plus:SI (FOO:SI) (const_int Y))) gives 0x4 and (plus:DI (zero_extend:DI (FOO:SI)) (const_int Y)) gives 0x100000004.
This was already clear upthread. I'm asking what it buys you in real code.
If (plus:SI (FOO:SI) (const_int Y)) won't overflow or its behavior is implementation-defined,
Behavior of plus:SI is never implementation defined, it is the extension that is done with an UNSPEC. (In fact I'm not even sure the optimization is ok when done with POINTER_EXTEND_UNSIGNED < 0, but I'm not touching that for now).
Paolo