aboutsummaryrefslogtreecommitdiff
path: root/gcc/fwprop.cc
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2025-09-02 15:58:26 -0700
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2025-09-02 15:58:26 -0700
commit071b4126c613881f4cb25b4e5c39032964827f88 (patch)
tree7ed805786566918630d1d617b1ed8f7310f5fd8e /gcc/fwprop.cc
parent845d23f3ea08ba873197c275a8857eee7edad996 (diff)
parentcaa1c2f42691d68af4d894a5c3e700ecd2dba080 (diff)
downloadgcc-devel/gfortran-test.zip
gcc-devel/gfortran-test.tar.gz
gcc-devel/gfortran-test.tar.bz2
Merge branch 'master' into gfortran-testdevel/gfortran-test
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;