Mat Hostetter <mhostet...@tilera.com> writes: > Since the high bits are already zero, that would be less efficient on > most platforms, so guarding it with something like this would probably > be smarter: > > if (targetm.mode_rep_extended (mode, GET_MODE(x)) == SIGN_EXTEND) > return simplify_gen_unary (TRUNCATE, mode, x, GET_MODE (x)); > > I'm happy to believe I'm doing something wrong in my back end, but I'm > not sure what that would be. I could also believe these are obscure > edge cases no one cared about before. Any tips would be appreciated.
Interesting. I think you are in obscure edge case territory. Your suggestion makes sense to me, and in fact it should probably be put into gen_lowpart_common. Ian