> It leads 2 problems: > > 1. Redundant zero-extension at function entry. > 2. combine doesn't check zero-extension on hard register and leads to > internal compiler error. > > Is there a way to avoid redundant zero-extension at function entry to > solve both problems?
Eliminating the redundant extension in the callee seems indeed to be appealing. You need to find out who decides that the incoming parameter needs to be zero- extended. Is that the call to promote_function_mode in assign_parm_setup_reg? -- Eric Botcazou