aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-10-19 13:58:27 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-10-19 13:58:27 +0000
commit4534c2032ba23be0a1f6b74ea2e23bc94df0cb81 (patch)
treeab6e2c78aa78e165e6c5f5307a23b2f3a4fa5fff /gcc/builtins.c
parent1c6e3c3e2ce560e555ba7d75a22179757a3c6489 (diff)
downloadgcc-4534c2032ba23be0a1f6b74ea2e23bc94df0cb81.zip
gcc-4534c2032ba23be0a1f6b74ea2e23bc94df0cb81.tar.gz
gcc-4534c2032ba23be0a1f6b74ea2e23bc94df0cb81.tar.bz2
gimple-fold.c (gimple_phi_nonnegative_warnv_p): New function.
2015-10-19 Richard Biener <rguenther@suse.de> * gimple-fold.c (gimple_phi_nonnegative_warnv_p): New function. (gimple_stmt_nonnegative_warnv_p): Use it. * match.pd (CPROJ): New operator list. (cproj (complex ...)): Move simplifications from ... * builtins.c (fold_builtin_cproj): ... here. * gcc.dg/torture/builtin-cproj-1.c: Skip for -O0. From-SVN: r228970
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index b4ac535..50ed7c6 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -7657,33 +7657,6 @@ fold_builtin_cproj (location_t loc, tree arg, tree type)
else
return arg;
}
- else if (TREE_CODE (arg) == COMPLEX_EXPR)
- {
- tree real = TREE_OPERAND (arg, 0);
- tree imag = TREE_OPERAND (arg, 1);
-
- STRIP_NOPS (real);
- STRIP_NOPS (imag);
-
- /* If the real part is inf and the imag part is known to be
- nonnegative, return (inf + 0i). Remember side-effects are
- possible in the imag part. */
- if (TREE_CODE (real) == REAL_CST
- && real_isinf (TREE_REAL_CST_PTR (real))
- && tree_expr_nonnegative_p (imag))
- return omit_one_operand_loc (loc, type,
- build_complex_cproj (type, false),
- arg);
-
- /* If the imag part is inf, return (inf+I*copysign(0,imag)).
- Remember side-effects are possible in the real part. */
- if (TREE_CODE (imag) == REAL_CST
- && real_isinf (TREE_REAL_CST_PTR (imag)))
- return
- omit_one_operand_loc (loc, type,
- build_complex_cproj (type, TREE_REAL_CST_PTR
- (imag)->sign), arg);
- }
return NULL_TREE;
}