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
This commit is contained in:
Ulrich Weigand 2016-03-10 23:58:44 +00:00 committed by Ulrich Weigand
parent f6c1032d03
commit 8287dbce7b
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,9 @@
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

View File

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