This is the mail archive of the
mailing list for the GCC project.
Re: [patch] PR rtl-optimization/65220: avoid integer division in stack alignment
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Aldy Hernandez <aldyh at redhat dot com>, Richard Henderson <rth at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Fri, 27 Feb 2015 09:37:59 +0100
- Subject: Re: [patch] PR rtl-optimization/65220: avoid integer division in stack alignment
- Authentication-results: sourceware.org; auth=none
> This is actually Jakub's patch from the PR, with a few minor tweaks that were needed to bootstrap
> and pass the regression suite. The splitter was using operand 0 without setting it first. It should've
> been operand 2. Also, there was a division by zero that was causing an invalid insn; fixed by
> changing the INTVAL + 2 into INTVAL - 2. Finally, a reload_completed was added at Jakub's
* config/i386/i386.md (*udivmod<mode>4_pow2): New.
+ "UINTVAL (operands) - 2 < <MODE_SIZE> * BITS_PER_UNIT
+ && (UINTVAL (operands) & (UINTVAL (operands) - 1)) == 0"
This should be "&& reload_completed", so it will also include the
above condition in the split condition.
OK for mainline with the above change.