]> git.ipfire.org Git - thirdparty/gcc.git/commit
Make more use of force_lowpart_subreg
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 18 Jun 2024 11:22:32 +0000 (12:22 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Tue, 18 Jun 2024 11:22:32 +0000 (12:22 +0100)
commita573ed4367ee685fb1bc50b79239b8b4b69872ee
tree1558449a90cba1ae19f39fa5beedced56e7511fe
parent6bd4fbae45d11795a9a6f54b866308d4d7134def
Make more use of force_lowpart_subreg

This patch makes target-independent code use force_lowpart_subreg
instead of simplify_gen_subreg and lowpart_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.

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

gcc/
* builtins.cc (expand_builtin_issignaling): Use force_lowpart_subreg
instead of simplify_gen_subreg and lowpart_subreg.
* expr.cc (convert_mode_scalar, expand_expr_real_2): Likewise.
* optabs.cc (expand_doubleword_mod): Likewise.
gcc/builtins.cc
gcc/expr.cc
gcc/optabs.cc