From 89649081c8037954d9e2dcfa0be88a7345cd14b4 Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah Date: Wed, 19 Jun 2019 01:42:21 +0000 Subject: [PATCH] tree-ssa-address.c (preferred_mem_scale_factor): Handle when mem_mode is BLKmode. gcc/ChangeLog: 2019-06-19 Kugan Vivekanandarajah * tree-ssa-address.c (preferred_mem_scale_factor): Handle when mem_mode is BLKmode. From-SVN: r272465 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-address.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d8b56f6472f..217b0097062 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-06-19 Kugan Vivekanandarajah + + * tree-ssa-address.c (preferred_mem_scale_factor): Handle when + mem_mode is BLKmode. + 2019-06-18 Max Filippov PR target/90922 diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c index cdd432a6e1a..e83e1b9296f 100644 --- a/gcc/tree-ssa-address.c +++ b/gcc/tree-ssa-address.c @@ -1134,6 +1134,10 @@ unsigned int preferred_mem_scale_factor (tree base, machine_mode mem_mode, bool speed) { + /* For BLKmode, we can't do anything so return 1. */ + if (mem_mode == BLKmode) + return 1; + struct mem_address parts = {}; addr_space_t as = TYPE_ADDR_SPACE (TREE_TYPE (base)); unsigned int fact = GET_MODE_UNIT_SIZE (mem_mode); -- 2.30.2