public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5531] Remove forgotten early return in ipa_value_range_from_jfunc
@ 2021-11-25 23:00 Jan Hubicka
0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2021-11-25 23:00 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:1b0acc4b800b589a39d637d7312da5cf969a5765
commit r12-5531-g1b0acc4b800b589a39d637d7312da5cf969a5765
Author: Jan Hubicka <jh@suse.cz>
Date: Thu Nov 25 23:58:48 2021 +0100
Remove forgotten early return in ipa_value_range_from_jfunc
gcc/ChangeLog:
* ipa-cp.c (ipa_value_range_from_jfunc): Remove forgotten early return.
gcc/testsuite/ChangeLog:
* gcc.dg/ipa/inline10.c: New test.
Diff:
---
gcc/ipa-cp.c | 1 -
gcc/testsuite/gcc.dg/ipa/inline10.c | 33 +++++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 703541d15cc..5d9bb974d6b 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -1620,7 +1620,6 @@ ipa_value_range_from_jfunc (ipa_node_params *info, cgraph_edge *cs,
ipa_jump_func *jfunc, tree parm_type)
{
value_range vr;
- return vr;
if (jfunc->m_vr)
ipa_vr_operation_and_type_effects (&vr,
jfunc->m_vr,
diff --git a/gcc/testsuite/gcc.dg/ipa/inline10.c b/gcc/testsuite/gcc.dg/ipa/inline10.c
new file mode 100644
index 00000000000..81884b4cceb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/inline10.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-Os -c -fdump-ipa-inline-details -fno-early-inlining -fno-partial-inlining" } */
+void link_error ();
+int
+test(int a)
+{
+ if (a>10)
+ {
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ link_error ();
+ }
+}
+int test2()
+{
+ for (int i=0;i<10;i++)
+ test(i);
+}
+/* { dg-final { scan-ipa-dump "Known to be false: not inlined, op0 > 10" "inline" } } */
+/* { dg-final { scan-ipa-dump "Inlined test" "inline" } } */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-25 23:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 23:00 [gcc r12-5531] Remove forgotten early return in ipa_value_range_from_jfunc Jan Hubicka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).