This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] RL78 one_cmplhi2 improvement
- From: DJ Delorie <dj at redhat dot com>
- To: "Sebastian Perta" <sebastian dot perta at renesas dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 20 Feb 2018 14:39:07 -0500
- Subject: Re: [PATCH] RL78 one_cmplhi2 improvement
- Authentication-results: sourceware.org; auth=none
Const type promotion is the bane of embedded developers...
One thing to try is to use (subreg:QI in a define_expand, so that
there's a one_cmplhi2 pattern that expands to two QImode insns that
operate on HImode input/outputs via SUBREGs.
I don't have high hopes of gcc optimizing this properly in all cases,
but it's worth trying.
If it doesn't work out, consider this patch approved, though.
Thanks!