mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-24 04:10:29 +08:00
see.c (see_def_extension_not_merged): Use copy_rtx_if_shared to avoid invalid sharing.
2008-05-28 Rafael Espindola <espindola@google.com> * see.c (see_def_extension_not_merged): Use copy_rtx_if_shared to avoid invalid sharing. 2008-05-28 Rafael Espindola <espindola@google.com> * gcc.dg/20080528-1.c: New test. From-SVN: r136115
This commit is contained in:
parent
acca98c08f
commit
5a976da002
@ -1,3 +1,8 @@
|
||||
2008-05-28 Rafael Espindola <espindola@google.com>
|
||||
|
||||
* see.c (see_def_extension_not_merged): Use copy_rtx_if_shared to avoid
|
||||
invalid sharing.
|
||||
|
||||
2008-05-28 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/36339
|
||||
|
11
gcc/see.c
11
gcc/see.c
@ -2554,6 +2554,17 @@ see_def_extension_not_merged (struct see_ref_s *curr_ref_s, rtx def_se)
|
||||
|
||||
/* The manipulation succeeded. Store the new manipulated reference. */
|
||||
|
||||
/* It is possible for dest_reg to appear multiple times in ref_copy. In this
|
||||
case, ref_copy now has invalid sharing. Copying solves the problem.
|
||||
We don't use copy_rtx as an optimization for the common case (no sharing).
|
||||
We can't just use copy_rtx_if_shared since it does nothing on INSNs.
|
||||
Another possible solution would be to make validate_replace_rtx_1
|
||||
public and use it instead of replace_rtx. */
|
||||
reset_used_flags (PATTERN (ref_copy));
|
||||
reset_used_flags (REG_NOTES (ref_copy));
|
||||
PATTERN (ref_copy) = copy_rtx_if_shared (PATTERN (ref_copy));
|
||||
REG_NOTES (ref_copy) = copy_rtx_if_shared (REG_NOTES (ref_copy));
|
||||
|
||||
/* Try to simplify the new manipulated insn. */
|
||||
validate_simplify_insn (ref_copy);
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
2008-05-28 Rafael Espindola <espindola@google.com>
|
||||
|
||||
* gcc.dg/20080528-1.c: New test.
|
||||
|
||||
2008-05-28 Arnaud Charlet <charlet@adacore.com>
|
||||
|
||||
* gnat.dg/old_errors.adb, gnat.dg/deep_old.adb: Adjust.
|
||||
|
9
gcc/testsuite/gcc.dg/20080528-1.c
Normal file
9
gcc/testsuite/gcc.dg/20080528-1.c
Normal file
@ -0,0 +1,9 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fsee" } */
|
||||
|
||||
unsigned long g(int a, int b) {
|
||||
return a / b;
|
||||
}
|
||||
unsigned long f(long int a) {
|
||||
return g(a, 1<<13);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user