aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorManolis Tsamis <manolis.tsamis@vrull.eu>2023-11-21 10:05:02 +0100
committerPhilipp Tomsich <philipp.tomsich@vrull.eu>2023-11-23 05:32:59 +0100
commit9d912820d02c7396676e04c4c05f6a0fdd92ed85 (patch)
tree76310c9fba5d7aab178d4b468044712d5bb5715c /gcc
parent990769a343f090088f5025ad233f88824b2c6263 (diff)
downloadgcc-9d912820d02c7396676e04c4c05f6a0fdd92ed85.zip
gcc-9d912820d02c7396676e04c4c05f6a0fdd92ed85.tar.gz
gcc-9d912820d02c7396676e04c4c05f6a0fdd92ed85.tar.bz2
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>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ifcvt.cc38
1 files changed, 0 insertions, 38 deletions
diff --git a/gcc/ifcvt.cc b/gcc/ifcvt.cc
index a0af553..be42609 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