tree-optimization/111233 - loop splitting miscompile
The change in
r14-2852-gf5fb9ff2396fd4 failed to update patch_loop_exit
to compensate for rewriting of a NE/EQ_EXPR to a new code. Fixed
with the following.
PR tree-optimization/111233
PR tree-optimization/111652
PR tree-optimization/111727
PR tree-optimization/111838
PR tree-optimization/112113
* tree-ssa-loop-split.cc (patch_loop_exit): Get the new
guard code instead of the old guard stmt.
(split_loop): Adjust.
* gcc.dg/torture/pr111233.c: New testcase.
* gcc.dg/torture/pr111652.c: Likewise.
* gcc.dg/torture/pr111727.c: Likewise.
* gcc.dg/torture/pr111838.c: Likewise.
* gcc.dg/torture/pr112113.c: Likewise.