summaryrefslogtreecommitdiff
path: root/gcc/tree-if-conv.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-29 13:06:23 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-29 13:06:23 +0000
commit2f439a712bac00afe1e40614728f4268245fa577 (patch)
treec894b409080257241f8d72971627df9474722fca /gcc/tree-if-conv.c
parent874cacba943d78b0dd28caac2b639a7184cd149a (diff)
downloadgcc-2f439a712bac00afe1e40614728f4268245fa577.tar.gz
PR tree-optimization/66142
* tree-if-conv.c (if_convertible_phi_p): Don't give up on virtual phis that feed themselves. * gcc.dg/vect/pr66142.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223863 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r--gcc/tree-if-conv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index a85c7a24180..28e1c475c5f 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -594,7 +594,8 @@ if_convertible_phi_p (struct loop *loop, basic_block bb, gphi *phi,
FOR_EACH_IMM_USE_FAST (use_p, imm_iter, gimple_phi_result (phi))
{
- if (gimple_code (USE_STMT (use_p)) == GIMPLE_PHI)
+ if (gimple_code (USE_STMT (use_p)) == GIMPLE_PHI
+ && USE_STMT (use_p) != (gimple) phi)
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Difficult to handle this virtual phi.\n");