may_propagate_copy_into_asm has been returning true always since
r0-118216-g01c59d23df7eef.
Many places that checks may_propagate_copy don't check
may_propagate_copy_into_asm for asm_expr. may_propagate_copy_into_stmt
does not check when you would have expected it to. So let's remove may_propagate_copy_into_asm
and remove the checks from substitute_and_fold_engine and dom.
Bootstrapped and tested on x86_64-linux-gnu.
PR tree-optimization/122182
gcc/ChangeLog:
* tree-ssa-dom.cc (cprop_operand): Don't check may_propagate_copy_into_asm.
* tree-ssa-propagate.cc (substitute_and_fold_engine::replace_uses_in): Don't
check may_propagate_copy_into_asm.
(may_propagate_copy_into_asm): Remove.
* tree-ssa-propagate.h (may_propagate_copy_into_asm): Remove.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
if (val && val != op)
{
- /* Do not replace hard register operands in asm statements. */
- if (gimple_code (stmt) == GIMPLE_ASM
- && !may_propagate_copy_into_asm (op))
- return;
-
/* Certain operands are not allowed to be copy propagated due
to their interaction with exception handling and some GCC
extensions. */
if (val == tuse || val == NULL_TREE)
continue;
- if (gimple_code (stmt) == GIMPLE_ASM
- && !may_propagate_copy_into_asm (tuse))
- continue;
-
if (!may_propagate_copy (tuse, val))
continue;
return true;
}
-/* Similarly, but we know that we're propagating into an ASM_EXPR. */
-
-bool
-may_propagate_copy_into_asm (tree dest ATTRIBUTE_UNUSED)
-{
- return true;
-}
-
-
/* Replace *OP_P with value VAL (assumed to be a constant or another SSA_NAME).
Use this version when not const/copy propagating values. For example,
extern bool stmt_makes_single_store (gimple *);
extern bool may_propagate_copy (tree, tree, bool = false);
extern bool may_propagate_copy_into_stmt (gimple *, tree);
-extern bool may_propagate_copy_into_asm (tree);
extern void propagate_value (use_operand_p, tree);
extern void replace_exp (use_operand_p, tree);
extern void propagate_tree_value (tree *, tree);