diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-12-15 00:17:03 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-12-15 00:17:03 +0100 |
commit | bbc8d04f0e238cd5e86c240021b2c0aaf1b58d1b (patch) | |
tree | 394f993fcbbae87c63dd6e7b5e257cc45767798a /gcc/cselib.c | |
parent | 302db8ba6180906dd9a8c4ce670aff804f921fab (diff) | |
download | gcc-bbc8d04f0e238cd5e86c240021b2c0aaf1b58d1b.zip gcc-bbc8d04f0e238cd5e86c240021b2c0aaf1b58d1b.tar.gz gcc-bbc8d04f0e238cd5e86c240021b2c0aaf1b58d1b.tar.bz2 |
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
Diffstat (limited to 'gcc/cselib.c')
-rw-r--r-- | gcc/cselib.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 <scalar_int_mode> (GET_MODE (dest), &mode) && n_sets + n_strict_low_parts < MAX_SETS) { |