From bbc8d04f0e238cd5e86c240021b2c0aaf1b58d1b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 15 Dec 2018 00:17:03 +0100 Subject: re PR rtl-optimization/88478 (valgrind error in cselib_record_sets) PR rtl-optimization/88478 * cselib.c (cselib_record_sets): Move sets[i].src_elt tests after REG_P (dest) test. * g++.dg/opt/pr88478.C: New test. From-SVN: r267159 --- gcc/cselib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/cselib.c') diff --git a/gcc/cselib.c b/gcc/cselib.c index 4a68439..9d68e3c 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -2616,10 +2616,10 @@ cselib_record_sets (rtx_insn *insn) preserves the upper bits that di:SI=zero_extend(flags:CCNO<=0). */ scalar_int_mode mode; if (dest != orig - && sets[i].src_elt && cselib_record_sets_hook && REG_P (dest) && HARD_REGISTER_P (dest) + && sets[i].src_elt && is_a (GET_MODE (dest), &mode) && n_sets + n_strict_low_parts < MAX_SETS) { -- cgit v1.1