public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/redhat/heads/gcc-9-branch)] backport: re PR tree-optimization/92930 (GCC incorrectly optimizes away __builtin_apply() calls)
@ 2020-01-23 10:13 Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2020-01-23 10:13 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3dc074bb11e81469a340fb333967b20a5bddf91e

commit 3dc074bb11e81469a340fb333967b20a5bddf91e
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Dec 20 18:44:16 2019 +0100

    backport: re PR tree-optimization/92930 (GCC incorrectly optimizes away __builtin_apply() calls)
    
    	Backported from mainline
    	2019-12-14  Jakub Jelinek  <jakub@redhat.com>
    
    	PR tree-optimization/92930
    	* ipa-pure-const.c (special_builtin_state): Don't handle
    	BUILT_IN_APPLY.
    
    	* gcc.dg/tree-ssa/pr92930.c: New test.

Diff:
---
 gcc/ChangeLog                           |  6 ++++++
 gcc/ipa-pure-const.c                    |  1 -
 gcc/testsuite/ChangeLog                 |  5 +++++
 gcc/testsuite/gcc.dg/tree-ssa/pr92930.c | 19 +++++++++++++++++++
 4 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 66897be..a942dc1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,6 +1,12 @@
 2019-12-20  Jakub Jelinek  <jakub@redhat.com>
 
 	Backported from mainline
+	2019-12-14  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/92930
+	* ipa-pure-const.c (special_builtin_state): Don't handle
+	BUILT_IN_APPLY.
+
 	2019-12-12  Jakub Jelinek  <jakub@redhat.com>
 
 	PR target/92904
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index bb561d0..0c6f84f 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -527,7 +527,6 @@ special_builtin_state (enum pure_const_state_e *state, bool *looping,
 	case BUILT_IN_CXA_END_CLEANUP:
 	case BUILT_IN_EH_COPY_VALUES:
 	case BUILT_IN_FRAME_ADDRESS:
-	case BUILT_IN_APPLY:
 	case BUILT_IN_APPLY_ARGS:
 	case BUILT_IN_ASAN_BEFORE_DYNAMIC_INIT:
 	case BUILT_IN_ASAN_AFTER_DYNAMIC_INIT:
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index fad1876..ae77ead 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,6 +1,11 @@
 2019-12-20  Jakub Jelinek  <jakub@redhat.com>
 
 	Backported from mainline
+	2019-12-14  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/92930
+	* gcc.dg/tree-ssa/pr92930.c: New test.
+
 	2019-12-12  Jakub Jelinek  <jakub@redhat.com>
 
 	PR target/92904
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr92930.c b/gcc/testsuite/gcc.dg/tree-ssa/pr92930.c
new file mode 100644
index 0000000..67e604b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr92930.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/92930 */
+/* { dg-do compile { target untyped_assembly } } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump "__builtin_apply " "optimized" } } */
+/* { dg-final { scan-tree-dump "__builtin_apply_args" "optimized" } } */
+
+void foo (int a, int b, int c, int d, int e, int f, int g);
+
+static void bar (int a, ...)
+{
+  __builtin_apply (foo, __builtin_apply_args (), 20);
+}
+
+int
+main ()
+{
+  bar (1024, 1025, 1026, 1027, 1028, 1029, 1030);
+  return 0;
+}


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gcc(refs/vendors/redhat/heads/gcc-9-branch)] backport: re PR tree-optimization/92930 (GCC incorrectly optimizes away __builtin_apply() calls)
@ 2020-01-23 10:16 Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2020-01-23 10:16 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:6a6bf672cde4340d6acfec5b1c8b797d43219922

commit 6a6bf672cde4340d6acfec5b1c8b797d43219922
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Dec 20 18:44:16 2019 +0100

    backport: re PR tree-optimization/92930 (GCC incorrectly optimizes away __builtin_apply() calls)
    
    	Backported from mainline
    	2019-12-14  Jakub Jelinek  <jakub@redhat.com>
    
    	PR tree-optimization/92930
    	* ipa-pure-const.c (special_builtin_state): Don't handle
    	BUILT_IN_APPLY.
    
    	* gcc.dg/tree-ssa/pr92930.c: New test.
    
    From-SVN: r279674

Diff:
---
 gcc/ChangeLog                           |  6 ++++++
 gcc/ipa-pure-const.c                    |  1 -
 gcc/testsuite/ChangeLog                 |  5 +++++
 gcc/testsuite/gcc.dg/tree-ssa/pr92930.c | 19 +++++++++++++++++++
 4 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b611ddd..7441696 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -5,6 +5,12 @@
 	diagnose teams not closely nested inside of target.
 
 	Backported from mainline
+	2019-12-14  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/92930
+	* ipa-pure-const.c (special_builtin_state): Don't handle
+	BUILT_IN_APPLY.
+
 	2019-12-12  Jakub Jelinek  <jakub@redhat.com>
 
 	PR target/92904
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index bb561d0..0c6f84f 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -527,7 +527,6 @@ special_builtin_state (enum pure_const_state_e *state, bool *looping,
 	case BUILT_IN_CXA_END_CLEANUP:
 	case BUILT_IN_EH_COPY_VALUES:
 	case BUILT_IN_FRAME_ADDRESS:
-	case BUILT_IN_APPLY:
 	case BUILT_IN_APPLY_ARGS:
 	case BUILT_IN_ASAN_BEFORE_DYNAMIC_INIT:
 	case BUILT_IN_ASAN_AFTER_DYNAMIC_INIT:
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 90f6531..cfff70b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,6 +1,11 @@
 2019-12-20  Jakub Jelinek  <jakub@redhat.com>
 
 	Backported from mainline
+	2019-12-14  Jakub Jelinek  <jakub@redhat.com>
+
+	PR tree-optimization/92930
+	* gcc.dg/tree-ssa/pr92930.c: New test.
+
 	2019-12-12  Jakub Jelinek  <jakub@redhat.com>
 
 	PR target/92904
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr92930.c b/gcc/testsuite/gcc.dg/tree-ssa/pr92930.c
new file mode 100644
index 0000000..67e604b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr92930.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/92930 */
+/* { dg-do compile { target untyped_assembly } } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump "__builtin_apply " "optimized" } } */
+/* { dg-final { scan-tree-dump "__builtin_apply_args" "optimized" } } */
+
+void foo (int a, int b, int c, int d, int e, int f, int g);
+
+static void bar (int a, ...)
+{
+  __builtin_apply (foo, __builtin_apply_args (), 20);
+}
+
+int
+main ()
+{
+  bar (1024, 1025, 1026, 1027, 1028, 1029, 1030);
+  return 0;
+}


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-23 10:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23 10:13 [gcc(refs/vendors/redhat/heads/gcc-9-branch)] backport: re PR tree-optimization/92930 (GCC incorrectly optimizes away __builtin_apply() calls) Jakub Jelinek
2020-01-23 10:16 Jakub Jelinek

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).