On 10/25/23 09:30, Jeff Law wrote:
- Should some common-code part be more suited to handle that?
We already elide redundant sign-zero extensions for other
reasons. Maybe we could add subreg promoted handling there?
Not in the context of this specific issue.
Robin's point (IIUC) is that if we put this logic into a zero/sign
extend expander, then it'll get used for *any* attempt to zero/sign
extend that goes through the target expander.
It doesn't work for your case because we use
gen_rtx_{ZERO,SIGN}_EXTEND directly. But if those were adjusted to
use the expander, then Robin's idea would be applicable to this case too
Understood. Definitely solid idea.
-Vineet