/* Support routines for Splitting Paths to loop backedges
- Copyright (C) 2015-2018 Free Software Foundation, Inc.
+ Copyright (C) 2015-2020 Free Software Foundation, Inc.
Contributed by Ajit Kumar Agarwal <ajitkum@xilinx.com>.
This file is part of GCC.
#include "gimple-iterator.h"
#include "tracer.h"
#include "predict.h"
-#include "params.h"
#include "gimple-ssa.h"
#include "tree-phinodes.h"
#include "ssa-iterators.h"
if (is_gimple_debug (stmt))
continue;
/* If there's a use in the joiner this might be a CSE/DCE
- opportunity. */
- if (gimple_bb (stmt) == bb)
+ opportunity, but not if the use is in a conditional
+ which makes this a likely if-conversion candidate. */
+ if (gimple_bb (stmt) == bb
+ && (!is_gimple_assign (stmt)
+ || (TREE_CODE_CLASS (gimple_assign_rhs_code (stmt))
+ != tcc_comparison)))
{
found_useful_phi = true;
break;
/* Upper Hard limit on the number statements to copy. */
if (num_stmts_in_join
- >= PARAM_VALUE (PARAM_MAX_JUMP_THREAD_DUPLICATION_STMTS))
+ >= param_max_jump_thread_duplication_stmts)
return false;
return true;