]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cfgexpand.c
Force IFN_LOAD/STORE_LANES operands to be memory (PR91577)
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 5 Sep 2019 07:50:07 +0000 (07:50 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 5 Sep 2019 07:50:07 +0000 (07:50 +0000)
commit359f25f8e224cb398a732d2e7b499d6e8385a007
tree5109160ca8dba4f4958a7f6f70770e84d87df17d
parentefd9a01b59eec33ff0bbba585a6e92c5a0234ed4
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.sandiford@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.

From-SVN: r275399
gcc/ChangeLog
gcc/cfgexpand.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr91577.f90 [new file with mode: 0644]