From: Kugan Vivekanandarajah Date: Fri, 24 Jul 2015 01:38:19 +0000 (+0000) Subject: cse.c (cse_insn): Fix missing check for STRICT_LOW_PART and minor clean up. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fa24123b0fbb8baeca2deb7c79b62c58f5c1fe23;p=gcc.git cse.c (cse_insn): Fix missing check for STRICT_LOW_PART and minor clean up. gcc/ChangeLog: 2015-07-23 Kugan Vivekanandarajah * cse.c (cse_insn): Fix missing check for STRICT_LOW_PART and minor clean up. From-SVN: r226134 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a1fd494156d..1d6fd3c7dff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-07-23 Kugan Vivekanandarajah + + * cse.c (cse_insn): Fix missing check for STRICT_LOW_PART and minor + clean up. + 2015-07-23 Uros Bizjak * config/i386/i386.c (ix86_build_builtin_va_list_64): Rename diff --git a/gcc/cse.c b/gcc/cse.c index 1c14d83eb89..96adf18e6b7 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -4529,10 +4529,10 @@ cse_insn (rtx_insn *insn) this case, and if it isn't set, then there will be no equivalence for the destination. */ if (n_sets == 1 && REG_NOTES (insn) != 0 - && (tem = find_reg_note (insn, REG_EQUAL, NULL_RTX)) != 0) + && (tem = find_reg_note (insn, REG_EQUAL, NULL_RTX)) != 0 + && (! rtx_equal_p (XEXP (tem, 0), SET_SRC (sets[0].rtl)))) { - if ((! rtx_equal_p (XEXP (tem, 0), SET_SRC (sets[0].rtl))) - || GET_CODE (SET_DEST (sets[0].rtl)) == STRICT_LOW_PART) + if (GET_CODE (SET_DEST (sets[0].rtl)) == STRICT_LOW_PART) src_eqv = copy_rtx (XEXP (tem, 0)); /* If DEST is of the form ZERO_EXTACT, as in: @@ -4544,14 +4544,14 @@ cse_insn (rtx_insn *insn) point. Note that this is different from SRC_EQV. We can however calculate SRC_EQV with the position and width of ZERO_EXTRACT. */ else if (GET_CODE (SET_DEST (sets[0].rtl)) == ZERO_EXTRACT - && CONST_INT_P (src_eqv) + && CONST_INT_P (XEXP (tem, 0)) && CONST_INT_P (XEXP (SET_DEST (sets[0].rtl), 1)) && CONST_INT_P (XEXP (SET_DEST (sets[0].rtl), 2))) { rtx dest_reg = XEXP (SET_DEST (sets[0].rtl), 0); rtx width = XEXP (SET_DEST (sets[0].rtl), 1); rtx pos = XEXP (SET_DEST (sets[0].rtl), 2); - HOST_WIDE_INT val = INTVAL (src_eqv); + HOST_WIDE_INT val = INTVAL (XEXP (tem, 0)); HOST_WIDE_INT mask; unsigned int shift; if (BITS_BIG_ENDIAN)