diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-01-18 09:41:59 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-01-18 09:41:59 +0100 |
commit | a22a86a18bd3946f59f46468344fe86d6756103e (patch) | |
tree | 30a8cc9367809e73bffd3aff278f8d3e20ccce90 /gcc/function.h | |
parent | e2947cfa2d1d4da13bb298b4f36cd745b007d88d (diff) | |
download | gcc-a22a86a18bd3946f59f46468344fe86d6756103e.zip gcc-a22a86a18bd3946f59f46468344fe86d6756103e.tar.gz gcc-a22a86a18bd3946f59f46468344fe86d6756103e.tar.bz2 |
arm: fix rtl checking bootstrap (PR target/93312)
As reported in PR93312, the:
> > > > > > * config/arm/arm.c (clear_operation_p): New function.
change broke RTL checking bootstrap.
On the testcase from the PR (which is distilled from libgcc2.c, so I think
we don't need to add it into testsuite) we ICE because SET_DEST (elt) is
not a REG, but SUBREG. The code uses REGNO on it, which is invalid, but
only stores it into a variable, then performs REG_P (reg) check,
determines it is not a REG and bails early.
The following patch just moves the regno variable initialization after that
check, it isn't used in between. And, as a small optimization, because
reg doesn't change, doesn't use REGNO (reg) a second time to set last_regno.
2020-01-18 Jakub Jelinek <jakub@redhat.com>
PR target/93312
* config/arm/arm.c (clear_operation_p): Don't use REGNO until
after checking the argument is a REG. Don't use REGNO (reg)
again to set last_regno, reuse regno variable instead.
Diffstat (limited to 'gcc/function.h')
0 files changed, 0 insertions, 0 deletions