]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add force_lowpart_subreg
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 16 Apr 2025 12:20:26 +0000 (13:20 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Wed, 16 Apr 2025 12:20:26 +0000 (13:20 +0100)
commitb33e9eb8d404475a45a53afa3e3cc0ff742d75ec
tree568af101d4e6c91364bb5d8c0e86ca8d31585471
parent021ccf9dee0c14455a205f2555326e027e9047d8
Add force_lowpart_subreg

optabs had a local function called lowpart_subreg_maybe_copy
that is very similar to the lowpart version of force_subreg.
This patch adds a force_lowpart_subreg wrapper around
force_subreg.

The only difference between the old and new functions is that
the old one asserted success while the new one doesn't.
It's common not to assert elsewhere when taking subregs;
normally a null result is enough.

Later patches will make more use of the new function.

gcc/
* explow.h (force_lowpart_subreg): Declare.
* explow.cc (force_lowpart_subreg): New function.

(cherry picked from commit 5f40d1c0cc6ce91ef28d326b8707b3f05e6f239c)
gcc/explow.cc
gcc/explow.h