+2018-06-07 Paul Koning <ni1d@arrl.net>
+
+ * compare-elim.c (try_merge_compare): Don't merge compare if
+ address contains a side effect.
+ (try_eliminate_compare): Likewise.
+
2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
* config.gcc: Support "tremont".
return false;
rtx src = SET_SRC (set);
+
+ /* If the source uses addressing modes with side effects, we can't
+ do the merge because we'd end up with a PARALLEL that has two
+ instances of that side effect in it. */
+ if (side_effects_p (src))
+ return false;
+
rtx flags = maybe_select_cc_mode (cmp, src, CONST0_RTX (GET_MODE (src)));
if (!flags)
{
else
return false;
+ /* If the source uses addressing modes with side effects, we can't
+ do the merge because we'd end up with a PARALLEL that has two
+ instances of that side effect in it. */
+ if (side_effects_p (cmp_src))
+ return false;
+
/* Determine if we ought to use a different CC_MODE here. */
flags = maybe_select_cc_mode (cmp, cmp_src, in_b);
if (flags == NULL)