aboutsummaryrefslogtreecommitdiff
path: root/gcc/fwprop.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fwprop.cc')
-rw-r--r--gcc/fwprop.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/fwprop.cc b/gcc/fwprop.cc
index 4ee44ad..59df7ca 100644
--- a/gcc/fwprop.cc
+++ b/gcc/fwprop.cc
@@ -836,6 +836,20 @@ forward_propagate_into (use_info *use, bool reg_prop_only = false)
if (def_insn->is_artificial ())
return false;
+ /* Do not propagate asms. The only kind of propagation that would
+ succeed is propagation into a register move. Such a propagation
+ is neutral if the destination of the move is a pseudo and unnecessarily
+ restricts the register allocator if the destination of the move is
+ a hard register.
+
+ Furthermore, unlike for a normal instruction, we cannot take a SET from an
+ asm and try dropping the CLOBBERs. The recog process does not (and should
+ not try to) second-guess whether what the user wrote can be changed and
+ so it has to assume that any asm given to it is a fair reflection of
+ what the user wrote. */
+ if (def_insn->is_asm ())
+ return false;
+
rtx_insn *def_rtl = def_insn->rtl ();
if (!NONJUMP_INSN_P (def_rtl))
return false;