This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/78255] [5/6/7 regression] Indirect sibling call causing wrong code generation for ARM
- From: "avieira at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 09 Nov 2016 18:16:41 +0000
- Subject: [Bug target/78255] [5/6/7 regression] Indirect sibling call causing wrong code generation for ARM
- Auto-submitted: auto-generated
- References: <bug-78255-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78255
--- Comment #1 from avieira at gcc dot gnu.org ---
OK I think I assigned the blame to the wrong function, I think it is the
responsibility of 'is_indirect_tailcall_p' to catch this. Though I believe the
last time it is called during the postreload pass, the call rtx still has a
symbolref in it and only later in the pass is it replaced with a register. Too
late for this function to catch it and after that 'reload_completed' is set to
true and 'arm_get_frame_offsets' only returns the precomputed offsets.
I have a workaround where I add a use clause to the sibling patterns, which
seems to work, but I am not entirely sure why it works and I am not sure it is
the right approach either.