diff options
author | Andreas Krebbel <Andreas.Krebbel@de.ibm.com> | 2014-02-07 14:20:17 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2014-02-07 14:20:17 +0000 |
commit | 8bd7070a7a6fc94831aa9a67083ae038410ab19b (patch) | |
tree | 568308588a3d98d59b2346356c4d5a36e636405b /gcc/optabs.c | |
parent | 831806cb211df749b12f47ee4b669e30f7a5f009 (diff) | |
download | gcc-8bd7070a7a6fc94831aa9a67083ae038410ab19b.zip gcc-8bd7070a7a6fc94831aa9a67083ae038410ab19b.tar.gz gcc-8bd7070a7a6fc94831aa9a67083ae038410ab19b.tar.bz2 |
optabs.c (expand_atomic_compare_and_swap): Allow expander to fail.
2014-02-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* optabs.c (expand_atomic_compare_and_swap): Allow expander to
fail.
From-SVN: r207599
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index e36fd13..cec25a4 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -7383,12 +7383,13 @@ expand_atomic_compare_and_swap (rtx *ptarget_bool, rtx *ptarget_oval, create_integer_operand (&ops[5], is_weak); create_integer_operand (&ops[6], succ_model); create_integer_operand (&ops[7], fail_model); - expand_insn (icode, 8, ops); - - /* Return success/failure. */ - target_bool = ops[0].value; - target_oval = ops[1].value; - goto success; + if (maybe_expand_insn (icode, 8, ops)) + { + /* Return success/failure. */ + target_bool = ops[0].value; + target_oval = ops[1].value; + goto success; + } } /* Otherwise fall back to the original __sync_val_compare_and_swap |