diff options
author | Richard Guenther <rguenther@suse.de> | 2007-09-06 16:05:32 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2007-09-06 16:05:32 +0000 |
commit | 111f1fca4d2d4e4fabf92b39c4310a3add21f29a (patch) | |
tree | d2016ac58e23a030401a505f77d9f7a08ae0c9d2 /gcc/fold-const.c | |
parent | 1f5a6b84ab344b601da7284a588de810c3c53451 (diff) | |
download | gcc-111f1fca4d2d4e4fabf92b39c4310a3add21f29a.zip gcc-111f1fca4d2d4e4fabf92b39c4310a3add21f29a.tar.gz gcc-111f1fca4d2d4e4fabf92b39c4310a3add21f29a.tar.bz2 |
re PR tree-optimization/32586 (New VN misses FRE opportunities)
2007-09-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/32586
* tree-ssa-sccvn.c (simplify_binary_expression): Avoid
folding if nothing changed.
(simplify_unary_expression): New function. Do tree combining
on conversion like codes.
(try_to_simplify): Call it.
* builtins.c (fold_builtin_cexp): Fold the built expressions.
* fold-const.c (fold_unary): Test result of get_callee_fndecl().
* g++.dg/tree-ssa/pr27090.C: Remove XFAILs.
* gcc.dg/tree-ssa/ssa-fre-1.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-3.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-5.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-4.c: Likewise, remove scan for
now obsolete simplification.
From-SVN: r128189
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 7a90b5e..a6fb08b 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -8464,7 +8464,7 @@ fold_unary (enum tree_code code, tree type, tree op0) if (TREE_CODE (arg0) == CALL_EXPR) { tree fn = get_callee_fndecl (arg0); - if (DECL_BUILT_IN_CLASS (fn) == BUILT_IN_NORMAL) + if (fn && DECL_BUILT_IN_CLASS (fn) == BUILT_IN_NORMAL) switch (DECL_FUNCTION_CODE (fn)) { CASE_FLT_FN (BUILT_IN_CEXPI): @@ -8506,7 +8506,7 @@ fold_unary (enum tree_code code, tree type, tree op0) if (TREE_CODE (arg0) == CALL_EXPR) { tree fn = get_callee_fndecl (arg0); - if (DECL_BUILT_IN_CLASS (fn) == BUILT_IN_NORMAL) + if (fn && DECL_BUILT_IN_CLASS (fn) == BUILT_IN_NORMAL) switch (DECL_FUNCTION_CODE (fn)) { CASE_FLT_FN (BUILT_IN_CEXPI): |