+2015-02-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ * tree-ssa-loop-ivopts.c (get_address_cost): Use right mode for offset.
+
2015-02-04 Jan Hubicka <hubicka@ucw.cz>
PR middle-end/64922
XEXP (addr, 1) = gen_int_mode (off, address_mode);
if (memory_address_addr_space_p (mem_mode, addr, as))
break;
- /* For some TARGET, like ARM THUMB1, the offset should be nature
- aligned. Try an aligned offset if address_mode is not QImode. */
- off = (address_mode == QImode)
- ? 0
- : ((unsigned HOST_WIDE_INT) 1 << i)
- - GET_MODE_SIZE (address_mode);
+ /* For some strict-alignment targets, the offset must be naturally
+ aligned. Try an aligned offset if mem_mode is not QImode. */
+ off = mem_mode != QImode
+ ? ((unsigned HOST_WIDE_INT) 1 << i)
+ - GET_MODE_SIZE (mem_mode)
+ : 0;
if (off > 0)
{
XEXP (addr, 1) = gen_int_mode (off, address_mode);