From 7f85e52c40563f7091bfc13e751f696d1f3dc26f Mon Sep 17 00:00:00 2001 From: Chung-Ju Wu Date: Tue, 16 Apr 2019 09:22:26 +0000 Subject: [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 --- gcc/ChangeLog | 5 +++++ gcc/config/nds32/nds32-pipelines-auxiliary.c | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) (limited to 'gcc') 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 + + * config/nds32/nds32-pipelines-auxiliary.c (wext_odd_dep_p): Handle + subreg. + 2019-04-16 Jakub Jelinek 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 -- cgit v1.1