diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2017-06-15 08:49:17 +0200 |
---|---|---|
committer | Segher Boessenkool <segher@gcc.gnu.org> | 2017-06-15 08:49:17 +0200 |
commit | dfc107627c31c493e4ed089aea79bc398738a27b (patch) | |
tree | 35a1676c76dcf1e50ef0d07ede691a4d39c3dbb8 | |
parent | 0f25124435030c3e788ce4425d799648ff906743 (diff) | |
download | gcc-dfc107627c31c493e4ed089aea79bc398738a27b.zip gcc-dfc107627c31c493e4ed089aea79bc398738a27b.tar.gz gcc-dfc107627c31c493e4ed089aea79bc398738a27b.tar.bz2 |
rs6000: Don't use REGNO in the add<mode>3 expander
The argument could be a subreg of reg instead, which means we have to
use reg_or_subregno instead of REGNO.
* config/rs6000/rs6000.md (add<mode>3): Use reg_or_subregno instead
of REGNO.
From-SVN: r249213
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2d5110c..f460df6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-06-15 Segher Boessenkool <segher@kernel.crashing.org> + + * config/rs6000/rs6000.md (add<mode>3): Use reg_or_subregno instead + of REGNO. + 2017-06-14 Maciej W. Rozycki <macro@imgtec.com> * config/mips/mips.md (MIPS16_T_REGNUM): Remove constant. diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index dedb2e3..8e1b460 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -1631,7 +1631,7 @@ /* Adding a constant to r0 is not a valid insn, so use a different strategy in that case. */ - if (REGNO (operands[1]) == 0 || REGNO (tmp) == 0) + if (reg_or_subregno (operands[1]) == 0 || reg_or_subregno (tmp) == 0) { if (operands[0] == operands[1]) FAIL; |