summaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-10 15:31:18 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-10 15:31:18 +0000
commit06308d2a85476f04a2a7249256a2ccccac9c4fd7 (patch)
treeff011893005758a4dd76471a465ba744ffbcc5d7 /gcc/builtins.c
parent84a2471067575918f5ad3038cb135464a5d39317 (diff)
downloadgcc-06308d2a85476f04a2a7249256a2ccccac9c4fd7.tar.gz
PR middle-end/52177
* builtins.c (fold_builtin_atomic_always_lock_free, expand_builtin_atomic_always_lock_free, fold_builtin_atomic_is_lock_free, expand_builtin_atomic_is_lock_free): Return and/or test boolean_true_node/boolean_false_node instead of integer_one_node/integer_zero_node. * c-c++-common/pr52177.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184096 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index cf4956123c3..b937d3d0938 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -5639,15 +5639,15 @@ fold_builtin_atomic_always_lock_free (tree arg0, tree arg1)
/* If the object has smaller alignment, the the lock free routines cannot
be used. */
if (type_align < mode_align)
- return integer_zero_node;
+ return boolean_false_node;
/* Check if a compare_and_swap pattern exists for the mode which represents
the required size. The pattern is not allowed to fail, so the existence
of the pattern indicates support is present. */
if (can_compare_and_swap_p (mode, true))
- return integer_one_node;
+ return boolean_true_node;
else
- return integer_zero_node;
+ return boolean_false_node;
}
/* Return true if the parameters to call EXP represent an object which will
@@ -5671,7 +5671,7 @@ expand_builtin_atomic_always_lock_free (tree exp)
}
size = fold_builtin_atomic_always_lock_free (arg0, arg1);
- if (size == integer_one_node)
+ if (size == boolean_true_node)
return const1_rtx;
return const0_rtx;
}
@@ -5686,8 +5686,8 @@ fold_builtin_atomic_is_lock_free (tree arg0, tree arg1)
return NULL_TREE;
/* If it isn't always lock free, don't generate a result. */
- if (fold_builtin_atomic_always_lock_free (arg0, arg1) == integer_one_node)
- return integer_one_node;
+ if (fold_builtin_atomic_always_lock_free (arg0, arg1) == boolean_true_node)
+ return boolean_true_node;
return NULL_TREE;
}
@@ -5717,7 +5717,7 @@ expand_builtin_atomic_is_lock_free (tree exp)
/* If the value is known at compile time, return the RTX for it. */
size = fold_builtin_atomic_is_lock_free (arg0, arg1);
- if (size == integer_one_node)
+ if (size == boolean_true_node)
return const1_rtx;
return NULL_RTX;