Commit 15b6695a by Richard Biener Committed by Richard Biener

re PR tree-optimization/82402 (error: SSA_NAME_OCCURS_IN_ABNORMAL_PHI should be set)

2017-11-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82402
	* tree-vect-loop-manip.c (create_lcssa_for_virtual_phi): Properly
	set SSA_NAME_OCCURS_IN_ABNORMAL_PHI.

	* gcc.dg/torture/pr82402.c: New testcase.

From-SVN: r255140
parent 406520e2
2017-11-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/82402
* tree-vect-loop-manip.c (create_lcssa_for_virtual_phi): Properly
set SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
2017-11-24 Marc Glisse <marc.glisse@inria.fr> 2017-11-24 Marc Glisse <marc.glisse@inria.fr>
* match.pd (0-ptr): New transformation. * match.pd (0-ptr): New transformation.
2017-11-24 Richard Biener <rguenther@suse.de> 2017-11-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/82402
* gcc.dg/torture/pr82402.c: New testcase.
2017-11-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/83128 PR tree-optimization/83128
* gcc.dg/tree-ssa/ssa-fre-62.c: New testcase. * gcc.dg/tree-ssa/ssa-fre-62.c: New testcase.
......
/* { dg-do compile } */
typedef int jmp_buf[1];
extern void exit(int) __attribute__((__noreturn__));
extern int setjmpx(jmp_buf) __attribute__((__returns_twice__));
jmp_buf jbAnagram;
int a[6];
int d;
int b () { exit (1); }
int c () { b (); }
int e ()
{
int f = 0;
for (; f < 6; f++)
a[f] = d;
c ();
setjmpx (jbAnagram);
}
...@@ -639,6 +639,8 @@ create_lcssa_for_virtual_phi (struct loop *loop) ...@@ -639,6 +639,8 @@ create_lcssa_for_virtual_phi (struct loop *loop)
gimple *stmt; gimple *stmt;
use_operand_p use_p; use_operand_p use_p;
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new_vop)
= SSA_NAME_OCCURS_IN_ABNORMAL_PHI (vop);
add_phi_arg (new_phi, vop, exit_e, UNKNOWN_LOCATION); add_phi_arg (new_phi, vop, exit_e, UNKNOWN_LOCATION);
gimple_phi_set_result (new_phi, new_vop); gimple_phi_set_result (new_phi, new_vop);
FOR_EACH_IMM_USE_STMT (stmt, imm_iter, vop) FOR_EACH_IMM_USE_STMT (stmt, imm_iter, vop)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment