Commit 061d40da by Kugan Vivekanandarajah Committed by Kugan Vivekanandarajah

re PR tree-optimization/86489 (ICE in gimple_phi_arg starting with r261682 when…

re PR tree-optimization/86489 (ICE in gimple_phi_arg starting with r261682 when building 531.deepsjeng_r with FDO + LTO)

gcc/ChangeLog:

2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
	    Richard Biener  <rguenther@suse.de>

	PR middle-end/86489
	* tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
	that the loop latch destination where phi is defined.

gcc/testsuite/ChangeLog:

2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR middle-end/86489
	* gcc.dg/pr86489.c: New test.


Co-Authored-By: Richard Biener <rguenther@suse.de>

From-SVN: r262622
parent b18bb376
2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
Richard Biener <rguenther@suse.de>
PR middle-end/86489
* tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
that the loop latch destination where phi is defined.
2018-07-12 Kito Cheng <kito.cheng@gmail.com>
* config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
......
2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
PR middle-end/86489
* gcc.dg/pr86489.c: New test.
2018-07-12 Martin Sebor <msebor@redhat.com>
PR testsuite/86510
......
/* { dg-do compile } */
/* { dg-options "-O2" } */
int a = 0, b = 0;
void fn1() {
int c = 0;
for (; a; a--)
c += b;
while ((c - 1) & c)
;
}
......@@ -2555,6 +2555,7 @@ number_of_iterations_popcount (loop_p loop, edge exit,
... = PHI <b_5(2), b_6(3)>. */
gimple *phi = SSA_NAME_DEF_STMT (b_11);
if (gimple_code (phi) != GIMPLE_PHI
|| (gimple_bb (phi) != loop_latch_edge (loop)->dest)
|| (gimple_assign_lhs (and_stmt)
!= gimple_phi_arg_def (phi, loop_latch_edge (loop)->dest_idx)))
return false;
......
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