public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-5770] ifcvt: remove obsolete SUBREG handling in noce_convert_multiple_sets
@ 2023-11-23  4:33 Philipp Tomsich
  0 siblings, 0 replies; only message in thread
From: Philipp Tomsich @ 2023-11-23  4:33 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:9d912820d02c7396676e04c4c05f6a0fdd92ed85

commit r14-5770-g9d912820d02c7396676e04c4c05f6a0fdd92ed85
Author: Manolis Tsamis <manolis.tsamis@vrull.eu>
Date:   Tue Nov 21 10:05:02 2023 +0100

    ifcvt: remove obsolete SUBREG handling in noce_convert_multiple_sets
    
    This code used to handle SUBREG for register replacement when ifcvt
    was doing the replacements manually. This special handling is not
    needed anymore because simplify_replace_rtx is used for the
    replacements and it properly handles these cases.
    
    gcc/ChangeLog:
    
            * ifcvt.cc (noce_convert_multiple_sets_1): Remove old code.
    
    Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>

Diff:
---
 gcc/ifcvt.cc | 38 --------------------------------------
 1 file changed, 38 deletions(-)

diff --git a/gcc/ifcvt.cc b/gcc/ifcvt.cc
index a0af553b9ff..be42609a848 100644
--- a/gcc/ifcvt.cc
+++ b/gcc/ifcvt.cc
@@ -3492,44 +3492,6 @@ noce_convert_multiple_sets_1 (struct noce_if_info *if_info,
       if (if_info->then_else_reversed)
 	std::swap (old_val, new_val);
 
-
-      /* We allow simple lowpart register subreg SET sources in
-	 bb_ok_for_noce_convert_multiple_sets.  Be careful when processing
-	 sequences like:
-	 (set (reg:SI r1) (reg:SI r2))
-	 (set (reg:HI r3) (subreg:HI (r1)))
-	 For the second insn new_val or old_val (r1 in this example) will be
-	 taken from the temporaries and have the wider mode which will not
-	 match with the mode of the other source of the conditional move, so
-	 we'll end up trying to emit r4:HI = cond ? (r1:SI) : (r3:HI).
-	 Wrap the two cmove operands into subregs if appropriate to prevent
-	 that.  */
-
-      if (!CONSTANT_P (new_val)
-	  && GET_MODE (new_val) != GET_MODE (temp))
-	{
-	  machine_mode src_mode = GET_MODE (new_val);
-	  machine_mode dst_mode = GET_MODE (temp);
-	  if (!partial_subreg_p (dst_mode, src_mode))
-	    {
-	      end_sequence ();
-	      return false;
-	    }
-	  new_val = lowpart_subreg (dst_mode, new_val, src_mode);
-	}
-      if (!CONSTANT_P (old_val)
-	  && GET_MODE (old_val) != GET_MODE (temp))
-	{
-	  machine_mode src_mode = GET_MODE (old_val);
-	  machine_mode dst_mode = GET_MODE (temp);
-	  if (!partial_subreg_p (dst_mode, src_mode))
-	    {
-	      end_sequence ();
-	      return false;
-	    }
-	  old_val = lowpart_subreg (dst_mode, old_val, src_mode);
-	}
-
       /* Try emitting a conditional move passing the backend the
 	 canonicalized comparison.  The backend is then able to
 	 recognize expressions like

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-23  4:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-23  4:33 [gcc r14-5770] ifcvt: remove obsolete SUBREG handling in noce_convert_multiple_sets Philipp Tomsich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).