diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2018-01-13 17:59:08 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-01-13 17:59:08 +0000 |
commit | 65dd1346027bb5dd54d5bfea0c35a3d52f8af416 (patch) | |
tree | 754f3d68a76e1f062c8029cd95e93079f9a75c10 /gcc/expr.c | |
parent | 0972596e6d2573a2c7e922c66b017974ed03ad89 (diff) | |
download | gcc-65dd1346027bb5dd54d5bfea0c35a3d52f8af416.zip gcc-65dd1346027bb5dd54d5bfea0c35a3d52f8af416.tar.gz gcc-65dd1346027bb5dd54d5bfea0c35a3d52f8af416.tar.bz2 |
Allow ADDR_EXPRs of TARGET_MEM_REFs
This patch allows ADDR_EXPR <TARGET_MEM_REF ...>, which is useful
when calling internal functions that take pointers to memory that
is conditionally loaded or stored. This is a prerequisite to the
following ivopts patch.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
TARGET_MEM_REFs.
* gimple-expr.h (is_gimple_addressable: Likewise.
* gimple-expr.c (is_gimple_address): Likewise.
* internal-fn.c (expand_call_mem_ref): New function.
(expand_mask_load_optab_fn): Use it.
(expand_mask_store_optab_fn): Likewise.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r256627
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -7885,6 +7885,9 @@ expand_expr_addr_expr_1 (tree exp, rtx target, scalar_int_mode tmode, return expand_expr (tem, target, tmode, modifier); } + case TARGET_MEM_REF: + return addr_for_mem_ref (exp, as, true); + case CONST_DECL: /* Expand the initializer like constants above. */ result = XEXP (expand_expr_constant (DECL_INITIAL (exp), |