On 24/11/2016 15:01, Michael Matz wrote: >> > (set (reg:DI 69) >> > (zero_extract:DI (reg:DI 65 [ v_x ]) <--------- >> > (const_int 32 [0x20]) >> > (const_int 20 [0x14]))) > Hmm, this transformation (from v_x>>12 to zext(v_x,32,20) is only valid > when the top 20 bits of v_x are known to be zero already, or alternatively > if it's know that the top 32bits of reg 69 won't matter in the future. I > wonder where that knowledge is coming from.
s390 is BITS_BIG_ENDIAN, so zext(v_x,32,20) really means the same as zext(v_x,32,12) with the more common convention. Insn 4 and 5 respectively set the low and high 32-bits of (reg:DI 65), so the transform seems fine to me. Paolo