From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11976 invoked by alias); 19 Dec 2013 18:43:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 11919 invoked by uid 48); 19 Dec 2013 18:42:57 -0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/59501] [4.9 Regression] Vector Gather with GCC 4.9 2013-12-08 Snapshot Date: Thu, 19 Dec 2013 18:43:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-12/txt/msg01881.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59501 --- Comment #4 from H.J. Lu --- (In reply to Jakub Jelinek from comment #3) > > I'm not saying that ix86_get_drap_rtx should be changed. > But perhaps: > /* If the only reason for frame_pointer_needed is that we conservatively > assumed stack realignment might be needed, but in the end nothing that > needed the stack alignment had been spilled, clear frame_pointer_needed > and say we don't need stack realignment. */ > if (stack_realign > && !crtl->need_drap > && frame_pointer_needed > && crtl->is_leaf > && flag_omit_frame_pointer > && crtl->sp_is_unchanging > && !ix86_current_function_calls_tls_descriptor > && !crtl->accesses_prior_frames > && !cfun->calls_alloca > && !crtl->calls_eh_return > && !(flag_stack_check && STACK_CHECK_MOVING_SP) > && !ix86_frame_pointer_required () > && get_frame_size () == 0 > && ix86_nsaved_sseregs () == 0 > && ix86_varargs_gpr_size + ix86_varargs_fpr_size == 0) > in ix86_finalize_stack_realign_flags could be tweaked, not to bail out > always if we have !crtl->need_drap, because then it will be set pretty much > for all leaf functions. I wonder if we can e.g. ask DF whether the drap reg > is live at entry, if it isn't live, supposedly we can clear crtl->need_drap > or ignore it > for this purpose? Also, I wonder even if we actually need the drap register > we can't for the leaf functions just avoid the dynamic realignment and > simply let the prologue set the drap reg to the right value. It sounds a good idea. BTW, I think we have very decent drap coverage in gcc testsuite, as long as both -m32 and -m64 are tested.