diff options
author | Jan Hubicka <jh@suse.cz> | 2009-03-08 23:37:26 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2009-03-08 22:37:26 +0000 |
commit | 8454d27e6e01ad0a9b49ebb7a2aba4a418d4a49e (patch) | |
tree | fcedff145130c2766355dc6f646f4dbf2024824b /gcc/tree-inline.c | |
parent | ae9b2a481c0f6510271cf12f86cd3b6b86490a96 (diff) | |
download | gcc-8454d27e6e01ad0a9b49ebb7a2aba4a418d4a49e.zip gcc-8454d27e6e01ad0a9b49ebb7a2aba4a418d4a49e.tar.gz gcc-8454d27e6e01ad0a9b49ebb7a2aba4a418d4a49e.tar.bz2 |
re PR target/39361 (Many new neon test failures)
PR target/39361
* tree-inline.c (setup_one_parameter): Do replacement of const argument
by constant in SSA form.
From-SVN: r144713
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 917b526..15419c3 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -2110,6 +2110,10 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn, We need to construct map for the variable anyway as it might be used in different SSA names when parameter is set in function. + Do replacement at -O0 for const arguments replaced by constant. + This is important for builtin_constant_p and other construct requiring + constant argument to be visible in inlined function body. + FIXME: This usually kills the last connection in between inlined function parameter and the actual value in debug info. Can we do better here? If we just inserted the statement, copy propagation @@ -2118,7 +2122,9 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn, We might want to introduce a notion that single SSA_NAME might represent multiple variables for purposes of debugging. */ if (gimple_in_ssa_p (cfun) && rhs && def && is_gimple_reg (p) - && optimize + && (optimize + || (TREE_READONLY (p) + && is_gimple_min_invariant (rhs))) && (TREE_CODE (rhs) == SSA_NAME || is_gimple_min_invariant (rhs)) && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (def)) |