]> git.ipfire.org Git - thirdparty/gcc.git/commit
Make more use of force_subreg
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 18 Jun 2024 11:22:30 +0000 (12:22 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Tue, 18 Jun 2024 11:22:30 +0000 (12:22 +0100)
commitd4047da6a070175aae7121c739d1cad6b08ff4b2
tree51b14b57fa572cdf27a6ad64566cc38474cc5bbd
parent1474a8eead4ab390e59ee014befa8c40346679f4
Make more use of force_subreg

This patch makes target-independent code use force_subreg instead
of simplify_gen_subreg in some places.  The criteria were:

(1) The code is obviously specific to expand (where new pseudos
    can be created), or at least would be invalid to call when
    !can_create_pseudo_p () and temporaries are needed.

(2) The value is obviously an rvalue rather than an lvalue.

(3) The offset wasn't a simple lowpart or highpart calculation;
    a later patch will deal with those.

Doing this should reduce the likelihood of bugs like PR115464
occuring in other situations.

gcc/
* expmed.cc (store_bit_field_using_insv): Use force_subreg
instead of simplify_gen_subreg.
(store_bit_field_1): Likewise.
(extract_bit_field_as_subreg): Likewise.
(extract_integral_bit_field): Likewise.
(emit_store_flag_1): Likewise.
* expr.cc (convert_move): Likewise.
(convert_modes): Likewise.
(emit_group_load_1): Likewise.
(emit_group_store): Likewise.
(expand_assignment): Likewise.
gcc/expmed.cc
gcc/expr.cc