From: Chung-Ju Wu Date: Tue, 16 Apr 2019 09:22:26 +0000 (+0000) Subject: [NDS32] Handle subreg correctly in wext_odd_dep_p. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7f85e52c40563f7091bfc13e751f696d1f3dc26f;p=gcc.git [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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 024f6757f3d..083864ec66c 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 0c043d4c03f..07ba0378783 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