[Bug rtl-optimization/66489] combine fails to merge insns if some are reused later on
segher at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 10 19:17:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66489
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |segher at gcc dot gnu.org
--- Comment #4 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Combine does not do this because it would need to combine 2 insns into 2.
This *can* be safely done (carefully). As a result combine can do more
work (which is good), but lifetime of registers can get longer too (but
also shorter in some cases). I don't yet know if it is a win on average.
diff --git a/gcc/combine.c b/gcc/combine.c
index 9861291..599d383 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -3992,8 +3992,8 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1,
rtx_insn *i0,
&& XVECLEN (newpat, 0) == 2
&& GET_CODE (XVECEXP (newpat, 0, 0)) == SET
&& GET_CODE (XVECEXP (newpat, 0, 1)) == SET
- && (i1 || set_noop_p (XVECEXP (newpat, 0, 0))
- || set_noop_p (XVECEXP (newpat, 0, 1)))
+// && (i1 || set_noop_p (XVECEXP (newpat, 0, 0))
+// || set_noop_p (XVECEXP (newpat, 0, 1)))
&& GET_CODE (SET_DEST (XVECEXP (newpat, 0, 0))) != ZERO_EXTRACT
&& GET_CODE (SET_DEST (XVECEXP (newpat, 0, 0))) != STRICT_LOW_PART
&& GET_CODE (SET_DEST (XVECEXP (newpat, 0, 1))) != ZERO_EXTRACT
More information about the Gcc-bugs
mailing list