backport patch for PR 64878: do not jump thread across more than one back-edge

2015-02-04  Sebastian Pop  <s.pop@samsung.com>
            Brian Rzycki  <b.rzycki@samsung.com>

	PR tree-optimization/64878
	* tree-ssa-threadedge.c: Include tree-ssa-loop.h.
	(fsm_find_control_statement_thread_paths): Add parameter seen_loop_phi.
	Stop recursion at loop phi nodes after having visited a loop phi node.

	* testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c: New.
2 files changed
tree: 9ff133f26c5d4f856e94e087db7b1dbd69d57205
  1. gcc-4.8/
  2. gcc-4.9/
  3. build-gcc.sh
  4. build.py