PR target/70168
* config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap):
Handle overlapping retval and newval.
From-SVN: r234126
+2016-03-10 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ PR target/70168
+ * config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap):
+ Handle overlapping retval and newval.
+
2016-03-10 Nick Clifton <nickc@redhat.com>
PR target/7044
if (mode != TImode && !reg_or_short_operand (oldval, mode))
oldval = copy_to_mode_reg (mode, oldval);
+ if (reg_overlap_mentioned_p (retval, newval))
+ newval = copy_to_reg (newval);
+
mem = rs6000_pre_atomic_barrier (mem, mod_s);
label1 = NULL_RTX;