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);