+2015-10-27 Richard Sandiford <richard.sandiford@arm.com>
+
+ * builtins.c (fold_builtin_logb): Rename to...
+ (fold_const_builtin_logb): ...this and remove STRIP_NOPS call.
+ (fold_builtin_significand): Rename to...
+ (fold_const_builtin_significand): ...this and remove STRIP_NOPS call.
+ (fold_builtin_1): Update accordingly.
+
2015-10-27 Richard Sandiford <richard.sandiford@arm.com>
* builtins.c (fold_builtin_fmin_fmax): Delete.
/* Fold a call to builtin logb/ilogb. */
static tree
-fold_builtin_logb (location_t loc, tree arg, tree rettype)
+fold_const_builtin_logb (location_t loc, tree arg, tree rettype)
{
if (! validate_arg (arg, REAL_TYPE))
return NULL_TREE;
- STRIP_NOPS (arg);
-
if (TREE_CODE (arg) == REAL_CST && ! TREE_OVERFLOW (arg))
{
const REAL_VALUE_TYPE *const value = TREE_REAL_CST_PTR (arg);
/* Fold a call to builtin significand, if radix == 2. */
static tree
-fold_builtin_significand (location_t loc, tree arg, tree rettype)
+fold_const_builtin_significand (location_t loc, tree arg, tree rettype)
{
if (! validate_arg (arg, REAL_TYPE))
return NULL_TREE;
- STRIP_NOPS (arg);
-
if (TREE_CODE (arg) == REAL_CST && ! TREE_OVERFLOW (arg))
{
const REAL_VALUE_TYPE *const value = TREE_REAL_CST_PTR (arg);
break;
CASE_FLT_FN (BUILT_IN_SIGNIFICAND):
- return fold_builtin_significand (loc, arg0, type);
+ return fold_const_builtin_significand (loc, arg0, type);
CASE_FLT_FN (BUILT_IN_ILOGB):
CASE_FLT_FN (BUILT_IN_LOGB):
- return fold_builtin_logb (loc, arg0, type);
+ return fold_const_builtin_logb (loc, arg0, type);
case BUILT_IN_ISASCII:
return fold_builtin_isascii (loc, arg0);