Bug 46555 - PHI RTL expansion leads to CSiBE regression
Summary: PHI RTL expansion leads to CSiBE regression
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-19 08:26 UTC by Jan Hubicka
Modified: 2010-11-19 10:55 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-11-19 10:55:11


Attachments
testcase (OpenTCP-1.0.4/icmp.c) (5.25 KB, application/octet-stream)
2010-11-19 08:26 UTC, Jan Hubicka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Hubicka 2010-11-19 08:26:47 UTC
Created attachment 22452 [details]
testcase (OpenTCP-1.0.4/icmp.c)

Hi,
the problem here seems to be worse regalloc and also
  # D.4060_6 = PHI <-1(2), -1(9), -1(11), -1(14), 0(15), -1(10)>
used to be optimized into since set of var to -1 (4 bytes), while now we
produce 3 different copies. 

Crossjumping would unify it, but very late in the game. The problem is that
ifcvt actually moves the set before conditoinal guarding the BB in question, so
the individual sets are drifted earlier to different places in the program.

Doing so might also complicate the regalloc.

Michael, perhaps we can tell out-of-ssa to unify such cases?  They are not that
infrequent (and I think old tree based out-of-ssa did that?)
Comment 1 Richard Biener 2010-11-19 10:55:11 UTC
Yep.  That's one optimization that was removed (out-of-SSA did that) and
we thought of doing this reverse mergephi optimization as a separate pass
before expansion.