This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/46801] [4.6 Regression] FAIL: gnat.dg/pack9.adb scan-tree-dump-not optimized "gnat_rcheck"
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 30 Jan 2012 14:36:37 +0000
- Subject: [Bug tree-optimization/46801] [4.6 Regression] FAIL: gnat.dg/pack9.adb scan-tree-dump-not optimized "gnat_rcheck"
- Auto-submitted: auto-generated
- References: <bug-46801-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46801
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.6.0
--- Comment #11 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-30 14:36:37 UTC ---
SRA does
Pack9.Copy (struct pack9__r2 * const x, struct pack9__r2 * const y)
{
+ integer t$i2;
const struct pack9__r2 t;
integer D.2584;
integer D.2583;
<bb 2>:
t = *y_1(D);
- D.2583_2 = t.i2;
+ t$i2_9 = y_1(D)->i2;
+ D.2583_2 = t$i2_9;
D.2584_3 = y_1(D)->i2;
D.2584_4 = D.2584_3;
if (D.2583_2 != D.2584_4)
@@ -206,6 +58,7 @@
<bb 4>:
*x_5(D) = t;
+ x_5(D)->i2 = t$i2_9;
return;
}
thus eliminates 't' and makes D.2583_2 and D.2584_3 redundant (and VN
figure that out and remove the if stmt).
Value-numbering does not see that in
<bb 2>:
t = *y_1(D);
<bb 3>:
D.2584_2 = t.i2;
D.2585_3 = y_1(D)->i2;
the two loads are the same (because it enters (only) the non-rewritten ops
into the hashtable). See PR52054.