Bug 52000 - cross-jumping drops MEM attributes even when it makes no changes to the code
Summary: cross-jumping drops MEM attributes even when it makes no changes to the code
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.7.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
Depends on:
Blocks:
 
Reported: 2012-01-25 19:17 UTC by Richard Sandiford
Modified: 2021-12-18 23:15 UTC (History)
0 users

See Also:
Host:
Target: x86_64-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-01-25 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Sandiford 2012-01-25 19:17:48 UTC
flow_find_cross_jump calls merge_memattrs for each pair of
instructions that it was thinking of merging, regardless of
whether the merge takes place.  This can cause mem attributes
to be dropped unnecessarily.  See:

    http://gcc.gnu.org/ml/gcc/2012-01/msg00015.html

for more discussion and context.
Comment 1 Andrew Pinski 2012-01-25 19:20:48 UTC
Confirmed.
Comment 2 Richard Biener 2012-01-26 11:21:33 UTC
It also calls merge_notes (so I suppose might drop REG_EQUAL notes).

Both should be delayed to commit time.