PR rtl-optimization/65220: avoid integer division in stack alignment
diff mbox

Message ID 54F4B220.7050003@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez March 2, 2015, 6:55 p.m. UTC
>> Do you actually need the reload completed?  Couldn't this be legitimately split
>> before reload (and then parts of it DCE'd as necessary)?
>>
>> Otherwise, the split condition does need "&&" as mentioned by Uros.
>
> Oh, I forgot -- even if you can exclude reload_completed,
> you'd then need to use "&& 1" to effectively copy the first
> condition.

And *this* is why I hate rtl.  All these secret magic knobs.  Arghh...

The following patch still fixes the problem in the PR, but without 
reload_completed.

I am doing a full round of tests.

OK pending tests?
commit ee167c8a716799af9eb0e2275156061d76719dac
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Mon Mar 2 10:53:29 2015 -0800

    	* config/i386/i386.md (*udivmod<mode>4_pow2): Remove
    	reload_completed.

Comments

Richard Henderson March 2, 2015, 9:40 p.m. UTC | #1
On 03/02/2015 10:55 AM, Aldy Hernandez wrote:
> 
>>> Do you actually need the reload completed?  Couldn't this be legitimately split
>>> before reload (and then parts of it DCE'd as necessary)?
>>>
>>> Otherwise, the split condition does need "&&" as mentioned by Uros.
>>
>> Oh, I forgot -- even if you can exclude reload_completed,
>> you'd then need to use "&& 1" to effectively copy the first
>> condition.
> 
> And *this* is why I hate rtl.  All these secret magic knobs.  Arghh...
> 
> The following patch still fixes the problem in the PR, but without
> reload_completed.
> 
> I am doing a full round of tests.
> 
> OK pending tests?
> 

Yes.


r~

Patch
diff mbox

diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 8495284..8a80415 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -7343,7 +7343,7 @@ 
   "UINTVAL (operands[3]) - 2 < <MODE_SIZE> * BITS_PER_UNIT
    && (UINTVAL (operands[3]) & (UINTVAL (operands[3]) - 1)) == 0"
   "#"
-  "&& reload_completed"
+  "&& 1"
   [(set (match_dup 1) (match_dup 2))
    (parallel [(set (match_dup 0) (lshiftrt:<MODE> (match_dup 2) (match_dup 4)))
 	      (clobber (reg:CC FLAGS_REG))])