Commit 8287dbce by Ulrich Weigand Committed by Ulrich Weigand

re PR target/70168 (Wrong code generation in __sync_val_compare_and_swap on PowerPC)

	PR target/70168
	* config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap):
	Handle overlapping retval and newval.

From-SVN: r234126
parent f6c1032d
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
......
......@@ -22283,6 +22283,9 @@ rs6000_expand_atomic_compare_and_swap (rtx operands[])
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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment