[PATCH] RL78 addsi3 improvement

2018-01-25 Thread Sebastian Perta
Hello, The following patch improves addsi3 by eliminating addw ax, #0 and replacing addw ax, #-1 with decw ax where possible (if operand 2 is const) The patch adds also a test case to check this. Regression test is OK, tested with the following command: make -k check-gcc RUNTESTFLAGS=--target_b

Re: [PATCH] RL78 addsi3 improvement

2018-01-25 Thread DJ Delorie
This is OK. I wonder if these types of optimizations should be added to the assembler too? At least, if relaxation is enabled...

RE: [PATCH] RL78 addsi3 improvement

2018-01-26 Thread Sebastian Perta
2018 19:38 > To: Sebastian Perta > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] RL78 addsi3 improvement > > > This is OK. > > I wonder if these types of optimizations should be added to the > assembler too? At least, if relaxation is enabled...