diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2009-12-17 19:32:32 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-12-17 20:32:32 +0100 |
commit | cbdd74793b8442f78a18c036cdac8a5ba472b7c5 (patch) | |
tree | 4db1da8a91f4f0e40164e1fc432e5ce5b3c4d9f6 /gcc | |
parent | 951d44970a5d7420134fe3902621a3e37f02be84 (diff) | |
download | gcc-cbdd74793b8442f78a18c036cdac8a5ba472b7c5.zip gcc-cbdd74793b8442f78a18c036cdac8a5ba472b7c5.tar.gz gcc-cbdd74793b8442f78a18c036cdac8a5ba472b7c5.tar.bz2 |
re PR debug/41679 (internal compiler error: in loc_cmp, at var-tracking.c:2433)
PR debug/41679
* var-tracking.c (count_uses): Count MO_VAL_USE of original
MO_VAL_SET value for COND_EXEC.
(add_stores): Handle conditional stores.
From-SVN: r155324
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/var-tracking.c | 50 |
2 files changed, 53 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a7760c4..2ac875f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,11 @@ 2009-12-17 Alexandre Oliva <aoliva@redhat.com> PR debug/41679 + * var-tracking.c (count_uses): Count MO_VAL_USE of original + MO_VAL_SET value for COND_EXEC. + (add_stores): Handle conditional stores. + + PR debug/41679 * var-tracking.c (use_type): Remove indirection from loc. (count_uses): Dereference incoming loc early. (add_uses): Dereference incoming loc early. diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 988e348..db7778b 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -4509,7 +4509,28 @@ count_uses (rtx *ploc, void *cuip) val = find_use_val (loc, mode, cui); if (val) - cselib_preserve_value (val); + { + if (mopt == MO_VAL_SET + && GET_CODE (PATTERN (cui->insn)) == COND_EXEC + && (REG_P (loc) + || (MEM_P (loc) + && (use_type (loc, NULL, NULL) == MO_USE + || cui->sets)))) + { + cselib_val *oval = cselib_lookup (loc, GET_MODE (loc), 0); + + gcc_assert (oval != val); + gcc_assert (REG_P (loc) || MEM_P (loc)); + + if (!cselib_preserved_value_p (oval)) + { + VTI (cui->bb)->n_mos++; + cselib_preserve_value (oval); + } + } + + cselib_preserve_value (val); + } else gcc_assert (mopt == MO_VAL_LOC); @@ -4905,7 +4926,32 @@ add_stores (rtx loc, const_rtx expr, void *cuip) if (nloc) oloc = nloc; - if (resolve && GET_CODE (mo->u.loc) == SET) + if (GET_CODE (PATTERN (cui->insn)) == COND_EXEC) + { + cselib_val *oval = cselib_lookup (oloc, GET_MODE (oloc), 0); + + gcc_assert (oval != v); + gcc_assert (REG_P (oloc) || MEM_P (oloc)); + + if (!cselib_preserved_value_p (oval)) + { + micro_operation *nmo = VTI (bb)->mos + VTI (bb)->n_mos++; + + cselib_preserve_value (oval); + + nmo->type = MO_VAL_USE; + nmo->u.loc = gen_rtx_CONCAT (mode, oval->val_rtx, oloc); + VAL_NEEDS_RESOLUTION (nmo->u.loc) = 1; + nmo->insn = mo->insn; + + if (dump_file && (dump_flags & TDF_DETAILS)) + log_op_type (nmo->u.loc, cui->bb, cui->insn, + nmo->type, dump_file); + } + + resolve = false; + } + else if (resolve && GET_CODE (mo->u.loc) == SET) { nloc = replace_expr_with_values (SET_SRC (expr)); |