https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69454
--- Comment #30 from H.J. Lu <hjl.tools at gmail dot com> --- Try this one: diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index a03a515..c82883e 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3588,16 +3588,6 @@ convert_scalars_to_vector () bitmap_obstack_release (NULL); df_process_deferred_rescans (); - /* Conversion means we may have 128bit register spills/fills - which require aligned stack. */ - if (converted_insns) - { - if (crtl->stack_alignment_needed < 128) - crtl->stack_alignment_needed = 128; - if (crtl->stack_alignment_estimated < 128) - crtl->stack_alignment_estimated = 128; - } - return 0; } @@ -29300,8 +29290,10 @@ ix86_minimum_alignment (tree exp, machine_mode mode, return align; /* Don't do dynamic stack realignment for long long objects with - -mpreferred-stack-boundary=2. */ - if ((mode == DImode || (type && TYPE_MODE (type) == DImode)) + -mpreferred-stack-boundary=2. The STV pass needs 64-bit alignment + for DImode. */ + if (!(TARGET_STV && TARGET_SSE2 && optimize > 1) + && (mode == DImode || (type && TYPE_MODE (type) == DImode)) && (!type || !TYPE_USER_ALIGN (type)) && (!decl || !DECL_USER_ALIGN (decl))) return 32;