http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48150

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-11-24 
14:58:30 UTC ---
Perhaps we could use as value of a$j SIGN_EXTRACT from the provided VALUE,
i.e. when a$j is 12-bit, assume
(debug_insn 14 13 15 2 (var_location:HI a$j (plus:HI (sign_extract:HI (reg/v:SI
3 bx [orig:69 k ] [69]) (const_int 12) (const_int 0))
        (const_int 7 [0x7]))) sra-1.c:41 -1
     (nil))
instead of
(debug_insn 14 13 15 2 (var_location:HI a$j (plus:HI (subreg:HI (reg/v:SI 3 bx
[orig:69 k ] [69]) 0)
        (const_int 7 [0x7]))) sra-1.c:41 -1
     (nil))
and then on shift left, reversable operation and shift right note that the
value
for the sign_extract would live in (sign_extract:HI (value of bx after shift
left) (const_int 12) (const_int 4)) after the left shift, etc.

I guess it would be pretty difficult and for not very common case though.

Reply via email to