diff options
author | Richard Henderson <rth@redhat.com> | 2004-07-09 19:24:27 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-07-09 19:24:27 -0700 |
commit | 020510c955a775c8b9d1144ec0d16ca6a8efab9a (patch) | |
tree | 51f4ee95f722240f3d4dc04e828383dded783010 /gcc/tree-ssa-ccp.c | |
parent | f3a096e85c5feacb2fe5e55bbcc607aa0545a0b7 (diff) | |
download | gcc-020510c955a775c8b9d1144ec0d16ca6a8efab9a.zip gcc-020510c955a775c8b9d1144ec0d16ca6a8efab9a.tar.gz gcc-020510c955a775c8b9d1144ec0d16ca6a8efab9a.tar.bz2 |
tree-ssa-ccp.c (ccp_fold_builtin): Strip conversion exprs with prejudice.
* tree-ssa-ccp.c (ccp_fold_builtin): Strip conversion exprs
with prejudice.
From-SVN: r84436
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index d2c503d..01da8f8 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -2405,7 +2405,16 @@ ccp_fold_builtin (tree stmt, tree fn) } if (result && ignore) - STRIP_NOPS (result); + { + /* STRIP_NOPS isn't strong enough -- it'll stop when we change modes, + but given that we're ignoring the result, we don't care what type + is being returned by the transformed function. */ + while (TREE_CODE (result) == NOP_EXPR + || TREE_CODE (result) == CONVERT_EXPR + || TREE_CODE (result) == NON_LVALUE_EXPR) + result = TREE_OPERAND (result, 0); + } + return result; } |