Re: [PATCH 6/6] sh: Fixes for RTL checking

2017-02-21 Thread Segher Boessenkool
On Wed, Feb 22, 2017 at 12:16:43AM +0900, Oleg Endo wrote: > That SUBREG vs. REG stuff is annoying.  Isn't there a simple function > that just does the right thing which can be used instead of manually > open-coding these checks over and over again? There is reg_or_subregno, which would even work

Re: [PATCH 6/6] sh: Fixes for RTL checking

2017-02-21 Thread Oleg Endo
On Tue, 2017-02-21 at 14:48 +, Segher Boessenkool wrote: > 2017-02-21  Segher Boessenkool   > > * config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of > a REG, look at the REG it is a SUBREG of. > (splitter for cmpeqsi_t): Ditto. > > --- >  gcc/config/sh/sh.md |

[PATCH 6/6] sh: Fixes for RTL checking

2017-02-21 Thread Segher Boessenkool
2017-02-21 Segher Boessenkool * config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of a REG, look at the REG it is a SUBREG of. (splitter for cmpeqsi_t): Ditto. --- gcc/config/sh/sh.md | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff