Re: Problem exposed by recent ARM multiply changes

2019-09-27 Thread Segher Boessenkool
On Fri, Sep 27, 2019 at 10:08:46AM +0200, Jakub Jelinek wrote: > On Thu, Sep 26, 2019 at 05:34:25PM -0500, Segher Boessenkool wrote: > > > Are you sure? > > > "The UMLAL instruction interprets the values from Rn and Rm as unsigned > > > integers. It multiplies these integers, and adds the 64-bit r

Re: Problem exposed by recent ARM multiply changes

2019-09-27 Thread Kyrill Tkachov
On 9/27/19 4:17 PM, Richard Earnshaw (lists) wrote: On 26/09/2019 07:49, Jakub Jelinek wrote: > On Wed, Sep 25, 2019 at 10:06:13PM -0600, Jeff Law wrote: >> (insn 13 12 14 2 (set (reg:SI 124) >>  (const_int -939524096 [0xc800])) "j.c":10:54 161 >> {*arm_movsi_insn} >>  

Re: Problem exposed by recent ARM multiply changes

2019-09-27 Thread Richard Earnshaw (lists)
On 26/09/2019 07:49, Jakub Jelinek wrote: On Wed, Sep 25, 2019 at 10:06:13PM -0600, Jeff Law wrote: (insn 13 12 14 2 (set (reg:SI 124) (const_int -939524096 [0xc800])) "j.c":10:54 161 {*arm_movsi_insn} (nil)) (insn 14 13 16 2 (parallel [ (set (reg:SI 132)

Re: Problem exposed by recent ARM multiply changes

2019-09-27 Thread Jakub Jelinek
On Thu, Sep 26, 2019 at 05:34:25PM -0500, Segher Boessenkool wrote: > > Are you sure? > > "The UMLAL instruction interprets the values from Rn and Rm as unsigned > > integers. It multiplies these integers, and adds the 64-bit result to the > > 64-bit unsigned integer contained in RdHi and RdLo." >

Re: Problem exposed by recent ARM multiply changes

2019-09-26 Thread Segher Boessenkool
On Fri, Sep 27, 2019 at 12:30:50AM +0200, Jakub Jelinek wrote: > On Thu, Sep 26, 2019 at 05:17:40PM -0500, Segher Boessenkool wrote: > > On Wed, Sep 25, 2019 at 10:06:13PM -0600, Jeff Law wrote: > > > (insn 14 13 16 2 (parallel [ > > > (set (reg:SI 132) > > > (plus:SI (m

Re: Problem exposed by recent ARM multiply changes

2019-09-26 Thread Jakub Jelinek
On Thu, Sep 26, 2019 at 05:17:40PM -0500, Segher Boessenkool wrote: > On Wed, Sep 25, 2019 at 10:06:13PM -0600, Jeff Law wrote: > > (insn 14 13 16 2 (parallel [ > > (set (reg:SI 132) > > (plus:SI (mult:SI (zero_extend:DI (reg/v:SI 115 [ sec ])) > >

Re: Problem exposed by recent ARM multiply changes

2019-09-26 Thread Segher Boessenkool
On Wed, Sep 25, 2019 at 10:06:13PM -0600, Jeff Law wrote: > (insn 14 13 16 2 (parallel [ > (set (reg:SI 132) > (plus:SI (mult:SI (zero_extend:DI (reg/v:SI 115 [ sec ])) > (zero_extend:DI (reg:SI 124))) > (reg:SI 130))) >

Re: Problem exposed by recent ARM multiply changes

2019-09-26 Thread Jakub Jelinek
On Thu, Sep 26, 2019 at 03:27:50PM -0600, Jeff Law wrote: > > Some machines support a multiplication that generates a product wider > > than the operands. Write the pattern for this as > > > > @smallexample > > (mult:@var{m} (sign_extend:@var{m} @var{x}) (sign_extend:@var{m} @var{y})) > > @end sm

Re: Problem exposed by recent ARM multiply changes

2019-09-26 Thread Jeff Law
On 9/26/19 10:05 AM, Jakub Jelinek wrote: > On Thu, Sep 26, 2019 at 10:01:56AM -0600, Jeff Law wrote: >> On 9/26/19 9:47 AM, Jakub Jelinek wrote: >>> On Thu, Sep 26, 2019 at 09:39:31AM -0600, Jeff Law wrote: Right. My point is that the multiplication patterns are an exception as well. >>

Re: Problem exposed by recent ARM multiply changes

2019-09-26 Thread Paul Koning
> On Sep 26, 2019, at 12:01 PM, Jeff Law wrote: > > On 9/26/19 9:47 AM, Jakub Jelinek wrote: >> On Thu, Sep 26, 2019 at 09:39:31AM -0600, Jeff Law wrote: >>> Right. My point is that the multiplication patterns are an exception as >>> well. >> >> Do you have some evidence for that? > It's in

Re: Problem exposed by recent ARM multiply changes

2019-09-26 Thread Jakub Jelinek
On Thu, Sep 26, 2019 at 10:01:56AM -0600, Jeff Law wrote: > On 9/26/19 9:47 AM, Jakub Jelinek wrote: > > On Thu, Sep 26, 2019 at 09:39:31AM -0600, Jeff Law wrote: > >> Right. My point is that the multiplication patterns are an exception as > >> well. > > > > Do you have some evidence for that? >

Re: Problem exposed by recent ARM multiply changes

2019-09-26 Thread Jeff Law
On 9/26/19 9:47 AM, Jakub Jelinek wrote: > On Thu, Sep 26, 2019 at 09:39:31AM -0600, Jeff Law wrote: >> Right. My point is that the multiplication patterns are an exception as >> well. > > Do you have some evidence for that? It's in the manual. And yes it potentially makes a huge mess due to th

Re: Problem exposed by recent ARM multiply changes

2019-09-26 Thread Jakub Jelinek
On Thu, Sep 26, 2019 at 09:39:31AM -0600, Jeff Law wrote: > Right. My point is that the multiplication patterns are an exception as > well. Do you have some evidence for that? I mean, e.g. simplify-rtx.c will in that case almost certainly misbehave, if some expression can have CONST_INT operand(

Re: Problem exposed by recent ARM multiply changes

2019-09-26 Thread Jeff Law
On 9/26/19 9:22 AM, Jakub Jelinek wrote: > On Thu, Sep 26, 2019 at 09:12:34AM -0600, Jeff Law wrote: >> On 9/26/19 12:49 AM, Jakub Jelinek wrote: >>> On Wed, Sep 25, 2019 at 10:06:13PM -0600, Jeff Law wrote: (insn 13 12 14 2 (set (reg:SI 124) (const_int -939524096 [0xc8000

Re: Problem exposed by recent ARM multiply changes

2019-09-26 Thread Kyrill Tkachov
On 9/26/19 4:32 PM, Jeff Law wrote: On 9/26/19 9:14 AM, Kyrill Tkachov wrote: On 9/26/19 4:12 PM, Jeff Law wrote: On 9/26/19 12:49 AM, Jakub Jelinek wrote: On Wed, Sep 25, 2019 at 10:06:13PM -0600, Jeff Law wrote: (insn 13 12 14 2 (set (reg:SI 124) (const_int -939524096 [0xfff

Re: Problem exposed by recent ARM multiply changes

2019-09-26 Thread Jeff Law
On 9/26/19 9:14 AM, Kyrill Tkachov wrote: > > On 9/26/19 4:12 PM, Jeff Law wrote: >> On 9/26/19 12:49 AM, Jakub Jelinek wrote: >> > On Wed, Sep 25, 2019 at 10:06:13PM -0600, Jeff Law wrote: >> >> (insn 13 12 14 2 (set (reg:SI 124) >> >> (const_int -939524096 [0xc800])) "j.c":10

Re: Problem exposed by recent ARM multiply changes

2019-09-26 Thread Jakub Jelinek
On Thu, Sep 26, 2019 at 09:12:34AM -0600, Jeff Law wrote: > On 9/26/19 12:49 AM, Jakub Jelinek wrote: > > On Wed, Sep 25, 2019 at 10:06:13PM -0600, Jeff Law wrote: > >> (insn 13 12 14 2 (set (reg:SI 124) > >> (const_int -939524096 [0xc800])) "j.c":10:54 161 > >> {*arm_movsi_insn

Re: Problem exposed by recent ARM multiply changes

2019-09-26 Thread Kyrill Tkachov
On 9/26/19 4:12 PM, Jeff Law wrote: On 9/26/19 12:49 AM, Jakub Jelinek wrote: > On Wed, Sep 25, 2019 at 10:06:13PM -0600, Jeff Law wrote: >> (insn 13 12 14 2 (set (reg:SI 124) >> (const_int -939524096 [0xc800])) "j.c":10:54 161 >> {*arm_movsi_insn} >>  (nil)) >> >> (insn

Re: Problem exposed by recent ARM multiply changes

2019-09-26 Thread Jeff Law
On 9/26/19 12:49 AM, Jakub Jelinek wrote: > On Wed, Sep 25, 2019 at 10:06:13PM -0600, Jeff Law wrote: >> (insn 13 12 14 2 (set (reg:SI 124) >> (const_int -939524096 [0xc800])) "j.c":10:54 161 >> {*arm_movsi_insn} >> (nil)) >> >> (insn 14 13 16 2 (parallel [ >> (

Re: Problem exposed by recent ARM multiply changes

2019-09-25 Thread Jakub Jelinek
On Wed, Sep 25, 2019 at 10:06:13PM -0600, Jeff Law wrote: > (insn 13 12 14 2 (set (reg:SI 124) > (const_int -939524096 [0xc800])) "j.c":10:54 161 > {*arm_movsi_insn} > (nil)) > > (insn 14 13 16 2 (parallel [ > (set (reg:SI 132) > (plus:SI (mult:

Problem exposed by recent ARM multiply changes

2019-09-25 Thread Jeff Law
> commit fa761b10d40aaa71e62fbc0c9f2ab8fc07a98b49 (HEAD, refs/bisect/bad) > Author: wilco > Date: Wed Sep 18 18:33:30 2019 + > > [ARM] Cleanup 64-bit multiplies > > Cleanup 64-bit multiplies. Combine the expanders using iterators. > Merge the signed/unsigned multiplies as