https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91577

--- Comment #5 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 
---
Author: rsandifo
Date: Thu Sep  5 07:50:07 2019
New Revision: 275399

URL: https://gcc.gnu.org/viewcvs?rev=275399&root=gcc&view=rev
Log:
Force IFN_LOAD/STORE_LANES operands to be memory (PR91577)

This patch uses the workaround Richi suggested in the PR: make
discover_nonconstant_array_refs mark the source of an IFN_LOAD_LANES
call and the destination of an IFN_STORE_LANES call as addressable,
so that they don't end up being REG rtxes during expansion.

I had to move the discover_nonconstant_array_refs call outside the
currently_expanding_to_rtl block since otherwise mark_addressable
just queues the decision for later.

2019-09-05  Richard Sandiford  <richard.sandif...@arm.com>

gcc/
        PR middle-end/91577
        * cfgexpand.c (discover_nonconstant_array_refs): Force the source
        of an IFN_LOAD_LANES call and the destination of an IFN_STORE_LANES
        call to be in memory.
        (pass_expand::execute): Call discover_nonconstant_array_refs before
        setting currently_expanding_to_rtl.

gcc/testsuite/
        PR middle-end/91577
        * gfortran.dg/pr91577.f90: New test, taken from temporary_1.f90.

Added:
    trunk/gcc/testsuite/gfortran.dg/pr91577.f90
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgexpand.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to