]> git.ipfire.org Git - thirdparty/gcc.git/commit
hppa: Fix (plus (plus (mult (a) (mem_shadd_constant)) (b)) (c)) optimization
authorJohn David Anglin <danglin@gcc.gnu.org>
Tue, 6 Aug 2024 17:40:26 +0000 (13:40 -0400)
committerJohn David Anglin <danglin@gcc.gnu.org>
Tue, 6 Aug 2024 17:40:26 +0000 (13:40 -0400)
commitdc01f249db5c4d08b76dc2783b1539290a800f2d
treec7c24581f1461d44c57c77f75973f14b2ba593a6
parent6b8e46d93a76055087071204fe5ae1dfbf5ef613
hppa: Fix (plus (plus (mult (a) (mem_shadd_constant)) (b)) (c)) optimization

The constant C must be an integral multiple of the shift value in
the above optimization.  Non integral values can occur evaluating
IMAGPART_EXPR when the shadd constant is 8 and we have SFmode.

2024-08-06  John David Anglin  <danglin@gcc.gnu.org>

gcc/ChangeLog:

PR target/113384
* config/pa/pa.cc (hppa_legitimize_address): Add check to
ensure constant is an integral multiple of shift the value.
gcc/config/pa/pa.cc