Bug 28643 - redundant phi-node in latch-block prevents vectorization
Summary: redundant phi-node in latch-block prevents vectorization
Status: RESOLVED DUPLICATE of bug 63168
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
Depends on:
Blocks:
 
Reported: 2006-08-07 20:51 UTC by Dorit Naishlos
Modified: 2014-10-16 08:34 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-08-08 01:47:02


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dorit Naishlos 2006-08-07 20:51:46 UTC
Since the fix for PR26969, we now fail to vectorize loops that have redundant phi-nodes in their (otherwise empty) latch block.
The testcase committed with the PR fix is an example for such a case.
See http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00034.html for more details.
Comment 1 Andrew Pinski 2006-08-08 01:47:02 UTC
SSA copy prop with dce after that should really be the correct way.

Confirmed.
Comment 2 Daniel Berlin 2006-08-08 06:14:10 UTC
Subject: Re:  redundant phi-node in latch-block
 prevents vectorization

pinskia at gcc dot gnu dot org wrote:
> ------- Comment #1 from pinskia at gcc dot gnu dot org  2006-08-08 01:47 -------
> SSA copy prop with dce after that should really be the correct way.
> 

Err, SSA copy prop should be enough, actually, since after copy-prop,
the phi will have no users (and they shouldn't care about code with no
uses that doesn't access memory).

Though it's interesting that this redundant phi survives so long. What
is creating it?

Comment 3 Dorit Naishlos 2006-08-08 07:38:38 UTC
> Err, SSA copy prop should be enough, actually, since after copy-prop,
> the phi will have no users (and they shouldn't care about code with no
> uses that doesn't access memory).
> Though it's interesting that this redundant phi survives so long. What
> is creating it?

I think it's loop-unswitch
Comment 4 Andrew Pinski 2006-08-26 04:45:14 UTC
This is not target specific.
Comment 5 Richard Biener 2014-10-16 08:34:54 UTC
No testcase here but problem is exactly the same as described in PR63168.

*** This bug has been marked as a duplicate of bug 63168 ***