diff options
author | Chung-Ju Wu <jasonwucj@gmail.com> | 2019-04-16 09:22:26 +0000 |
---|---|---|
committer | Chung-Ju Wu <jasonwucj@gcc.gnu.org> | 2019-04-16 09:22:26 +0000 |
commit | 7f85e52c40563f7091bfc13e751f696d1f3dc26f (patch) | |
tree | 517b58c708edddeda3282bbbbd5d34311abac30a /gcc | |
parent | 8feb61a3c53240194d76c1a8e57a07faa5ef5d4c (diff) | |
download | gcc-7f85e52c40563f7091bfc13e751f696d1f3dc26f.zip gcc-7f85e52c40563f7091bfc13e751f696d1f3dc26f.tar.gz gcc-7f85e52c40563f7091bfc13e751f696d1f3dc26f.tar.bz2 |
[NDS32] Handle subreg correctly in wext_odd_dep_p.
gcc/
* config/nds32/nds32-pipelines-auxiliary.c (wext_odd_dep_p): Handle
subreg.
From-SVN: r270382
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/nds32/nds32-pipelines-auxiliary.c | 16 |
2 files changed, 17 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 024f675..083864e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-04-16 Chung-Ju Wu <jasonwucj@gmail.com> + + * config/nds32/nds32-pipelines-auxiliary.c (wext_odd_dep_p): Handle + subreg. + 2019-04-16 Jakub Jelinek <jakub@redhat.com> PR target/90096 diff --git a/gcc/config/nds32/nds32-pipelines-auxiliary.c b/gcc/config/nds32/nds32-pipelines-auxiliary.c index 0c043d4..07ba037 100644 --- a/gcc/config/nds32/nds32-pipelines-auxiliary.c +++ b/gcc/config/nds32/nds32-pipelines-auxiliary.c @@ -363,14 +363,19 @@ wext_odd_dep_p (rtx insn, rtx def_reg) return reg_overlap_p (def_reg, use_reg); gcc_assert (REG_P (def_reg) || GET_CODE (def_reg) == SUBREG); - gcc_assert (REG_P (use_reg)); + gcc_assert (REG_P (use_reg) || GET_CODE (use_reg) == SUBREG); if (REG_P (def_reg)) { - if (!TARGET_BIG_ENDIAN) - return REGNO (def_reg) == REGNO (use_reg) + 1; + if REG_P (use_reg) + { + if (!TARGET_BIG_ENDIAN) + return REGNO (def_reg) == REGNO (use_reg) + 1; + else + return REGNO (def_reg) == REGNO (use_reg); + } else - return REGNO (def_reg) == REGNO (use_reg); + return true; } if (GET_CODE (def_reg) == SUBREG) @@ -378,6 +383,9 @@ wext_odd_dep_p (rtx insn, rtx def_reg) if (!reg_overlap_p (def_reg, use_reg)) return false; + if (GET_CODE (use_reg) == SUBREG) + return true; + if (!TARGET_BIG_ENDIAN) return SUBREG_BYTE (def_reg) == 4; else |