Commit 9221f990 by Segher Boessenkool Committed by Segher Boessenkool

ifcvt: Call fixup_partitions (PR83361)

After converting a conditional branch to an unconditional trap to a
conditional trap, if the original trap is still reachable from another
path, it may be that it is in a hot basic block  and only reachable from
cold blocks.  Fix that up.


	PR rtl-optimization/83361
	* ifcvt.c (if_convert): Call fixup_partitions.

gcc/testsuite/
	PR rtl-optimization/83361
	* gcc.dg/pr83361.c: New testcase.

From-SVN: r255550
parent a5648717
2017-12-11 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/83361
* ifcvt.c (if_convert): Call fixup_partitions.
2017-12-11 Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
......@@ -5446,6 +5446,10 @@ if_convert (bool after_combine)
if (optimize == 1)
df_remove_problem (df_live);
/* Some non-cold blocks may now be only reachable from cold blocks.
Fix that up. */
fixup_partitions ();
checking_verify_flow_info ();
}
......
2017-12-11 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/83361
* gcc.dg/pr83361.c: New testcase.
2017-12-11 Will Schmidt <will_schmidt@vnet.ibm.com>
* gcc.target/powerpc/fold-vec-splat-misc-invalid.c: New.
......
/* PR rtl-optimization/83361 */
/* { dg-do compile } */
/* { dg-options "-O2 -freorder-blocks-and-partition" } */
#include <limits.h>
int yz;
void
tq (int z3)
{
unsigned long long int n8 = (unsigned long long int)INT_MAX + 1;
int *ey = &yz;
if (yz == 0)
{
int bc;
yz = 1;
while (yz != 0)
{
*ey *= bc;
n8 = !!(1 / ((unsigned long long int)yz == n8));
ey = &z3;
}
while (z3 != 0)
{
}
}
z3 = (n8 != 0) && (*ey != 0);
z3 = yz / z3;
if (z3 < 0)
{
if (yz != 0)
yz = 0;
yz /= 0;
}
}
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