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 rtl-optimization/65220] [4.8/4.9/5 Regression] integer division in stack alignment for VLA allocation


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
See r164593.  expand_divmod works just fine, but here we aren't dividing by
CONST_INT, but virtual reg.
One way to improve this, if crtl->preferred_stack_boundary is always a power of
two, would be to add another virtual register,
virtual_preferred_stack_boundary_log_rtx, which would be substituted with
exact_log2 (crtl->preferred_stack_boundary / BITS_PER_UNIT).
Another possibility is to tweak i?86 udivmod* patterns, so that they would
accept non-immediates and power of two CONST_INTs, but because that patterns
computes both division and modulus, we'd need to split that into LSHIFTRT and
AND.  As i?86 is the only target with SUPPORTS_STACK_ALIGNMENT support, perhaps
this change would be more kind to all other targets.


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