This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/79002] Weird c++ assembly code generated for tail call


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79002

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
And difference before tailcall detection is

--- a/t.C.042t.eipa_sra 2017-01-05 13:42:55.792951212 +0100
+++ b/t.C.042t.eipa_sra 2017-01-05 13:42:43.280808614 +0100
@@ -8,13 +8,13 @@
   int i;
   unsigned char * p.0_1;
   unsigned char _2;
-  int g.1_3;
+  int g.1_4;

   <bb 2> [0.0%]:
   p.0_1 = p;
   _2 = *p.0_1;
-  g.1_3 = g;
-  if (g.1_3 >= j_7(D))
+  g.1_4 = g;
+  if (g.1_4 >= j_9(D))
     goto <bb 4>; [0.0%]
   else
     goto <bb 3>; [0.0%]
@@ -31,6 +31,9 @@
   <bb 5> [0.0%]:
   return;

+<L3> [0.0%]:
+  resx 1
+
 }

thus this is a generic EH optimization issue as well.  ehcleanup1 fixes this
but that runs after tailr1.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]