[ARM][PR target/84826] Fix ICE in extract_insn, at recog.c:2304 on
authorSudakshina Das <sudi.das@arm.com>
Thu, 22 Mar 2018 17:24:41 +0000 (17:24 +0000)
committerSudakshina Das <sudi@gcc.gnu.org>
Thu, 22 Mar 2018 17:24:41 +0000 (17:24 +0000)
commitbb4ac03b8ffda26d3b1d55d433b777509dbc5e4c
treeadaaf81bbf737cd7ad08fc0dd9c5425ba529deb9
parent253db5538bfa249acd24d3aa30a3e28bcf8046d1
[ARM][PR target/84826] Fix ICE in extract_insn, at recog.c:2304 on
arm-linux-gnueabi

The ICE in the bug report was happening because the macro
USE_RETURN_INSN (FALSE) was returning different values at different points
in the compilation. This was internally occurring because the function
arm_compute_static_chain_stack_bytes () which was dependent on
arm_r3_live_at_start_p () was giving a different value after the cond_exec
instructions were created in ce3 causing the liveness of r3 to escape up
to the start block.

The function arm_compute_static_chain_stack_bytes () should really only
compute the value once duringepilogue/prologue stage. This pass introduces
a new member 'static_chain_stack_bytes' to the target definition of the
struct machine_function which gets calculated in expand_prologue and is the
value that is returned by arm_compute_static_chain_stack_bytes () beyond that.

ChangeLog entries:

*** gcc/ChangeLog ***

2018-03-22  Sudakshina Das  <sudi.das@arm.com>

PR target/84826
* config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
* config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
re-computing once computed.
(arm_expand_prologue): Compute machine->static_chain_stack_bytes.
(arm_init_machine_status): Initialize
machine->static_chain_stack_bytes.

*** gcc/testsuite/ChangeLog ***

2018-03-22  Sudakshina Das  <sudi.das@arm.com>

PR target/84826
* gcc.target/arm/pr84826.c: New test.

From-SVN: r258777
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/pr84826.c [new file with mode: 0644]