I came across this RTL on AVR in  combine dump (part of va-arg-9.c test)

(set (reg:QI 25 r25 [+1 ])
   (subreg:QI (sign_extend:HI (reg:QI 49)) 1))

The sign extension is completely redundant - the upper part of register is not used elsewhere - but the RTL remains unchanged through all the optimizers and sign_extension appears in final code.

Which RTL optimisation should be taking care of this? Propagation?
It would help me look in the right place to understand and perhaps fix issue.

I suspect the presence of hard register is why it does not get removed. (the hard register is the function return value)


Andy


Reply via email to