[PATCH, PR target/69454] Disable TARGET_STV when stack is not properly aligned
Jakub Jelinek
jakub@redhat.com
Tue Feb 2 13:09:00 GMT 2016
On Tue, Feb 02, 2016 at 04:46:26AM -0800, H.J. Lu wrote:
> >> So, is http://gcc.gnu.org/ml/gcc-patches/2016-01/msg02129.html
> >> ok for trunk then (alone or with additional sorry, incremental or not?)?
> >> I believe it does just that.
> >
> > This patch is WRONG.
> >
> > --
> > H.J.
>
> You will run into the same ICE with
>
> -mincoming-stack-boundary=2 -msse2 -O2 -m32
>
> in a leaf function which needs DImode spill/fill.
So are you arguing for changing
+ /* Disable STV if -mpreferred-stack-boundary=2 - the needed
+ stack realignment will be extra cost the pass doesn't take into
+ account and the pass can't realign the stack. */
+ if (ix86_preferred_stack_boundary < 64)
+ opts->x_target_flags &= ~MASK_STV;
to
+ /* Disable STV if -m{preferred,incoming}-stack-boundary=2 - the needed
+ stack realignment will be extra cost the pass doesn't take into
+ account and the pass can't realign the stack. */
+ if (ix86_preferred_stack_boundary < 64
+ || ix86_incoming_stack_boundary < 64)
+ opts->x_target_flags &= ~MASK_STV;
I'm fine with that.
Jakub
More information about the Gcc-patches
mailing list