From 2f439a712bac00afe1e40614728f4268245fa577 Mon Sep 17 00:00:00 2001 From: jakub Date: Fri, 29 May 2015 13:06:23 +0000 Subject: 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 --- gcc/tree-if-conv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/tree-if-conv.c') 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"); -- cgit v1.2.1