aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/ia64/ia64.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/ia64/ia64.c')
-rw-r--r--gcc/config/ia64/ia64.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 34a37d2..ae77a98 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -2141,11 +2141,13 @@ ia64_expand_atomic_op (enum rtx_code code, rtx mem, rtx val,
new_reg = cmp_reg;
if (code == NOT)
{
- new_reg = expand_simple_unop (DImode, NOT, new_reg, NULL_RTX, true);
- code = AND;
+ new_reg = expand_simple_binop (DImode, AND, new_reg, val, NULL_RTX,
+ true, OPTAB_DIRECT);
+ new_reg = expand_simple_unop (DImode, code, new_reg, NULL_RTX, true);
}
- new_reg = expand_simple_binop (DImode, code, new_reg, val, NULL_RTX,
- true, OPTAB_DIRECT);
+ else
+ new_reg = expand_simple_binop (DImode, code, new_reg, val, NULL_RTX,
+ true, OPTAB_DIRECT);
if (mode != DImode)
new_reg = gen_lowpart (mode, new_reg);