Fix expand_atomic_fetch_op wrt unused_result.
* optabs.c (expand_atomic_fetch_op): Always return result. From-SVN: r181750
This commit is contained in:
parent
022c0cd11d
commit
2b894715ba
2 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,7 @@
|
||||||
2011-11-26 Richard Henderson <rth@redhat.com>
|
2011-11-26 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* optabs.c (expand_atomic_fetch_op): Always return result.
|
||||||
|
|
||||||
* optabs.c (init_sync_libfuncs_1): Include max in iteration.
|
* optabs.c (init_sync_libfuncs_1): Include max in iteration.
|
||||||
|
|
||||||
* omp-low.c (expand_omp_atomic): Assume anything aligned to
|
* omp-low.c (expand_omp_atomic): Assume anything aligned to
|
||||||
|
|
|
@ -8068,7 +8068,7 @@ expand_atomic_fetch_op (rtx target, rtx mem, rtx val, enum rtx_code code,
|
||||||
{
|
{
|
||||||
/* If the result isn't used, no need to do compensation code. */
|
/* If the result isn't used, no need to do compensation code. */
|
||||||
if (unused_result)
|
if (unused_result)
|
||||||
return target;
|
return result;
|
||||||
|
|
||||||
/* Issue compensation code. Fetch_after == fetch_before OP val.
|
/* Issue compensation code. Fetch_after == fetch_before OP val.
|
||||||
Fetch_before == after REVERSE_OP val. */
|
Fetch_before == after REVERSE_OP val. */
|
||||||
|
@ -8110,9 +8110,7 @@ expand_atomic_fetch_op (rtx target, rtx mem, rtx val, enum rtx_code code,
|
||||||
result = emit_library_call_value (libfunc, NULL, LCT_NORMAL, mode,
|
result = emit_library_call_value (libfunc, NULL, LCT_NORMAL, mode,
|
||||||
2, addr, ptr_mode, val, mode);
|
2, addr, ptr_mode, val, mode);
|
||||||
|
|
||||||
if (unused_result)
|
if (!unused_result && fixup)
|
||||||
return target;
|
|
||||||
if (fixup)
|
|
||||||
result = expand_simple_binop (mode, code, result, val, target,
|
result = expand_simple_binop (mode, code, result, val, target,
|
||||||
true, OPTAB_LIB_WIDEN);
|
true, OPTAB_LIB_WIDEN);
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Add table
Reference in a new issue