Re: Canonicalization of compares performed as side-effect operations

2019-08-19 Thread Richard Earnshaw (lists)
On 14/08/2019 08:48, Eric Botcazou wrote: [Sorry for the delay, I missed your question...] Interesting. Does it work for the general case of a reverse subtract, which I need to handle as wel? Not clear, Visium only uses it for SNE and combined NEG/SNE. I worked through the logic. I'm

Re: Canonicalization of compares performed as side-effect operations

2019-08-14 Thread Eric Botcazou
[Sorry for the delay, I missed your question...] > Interesting. Does it work for the general case of a reverse subtract, > which I need to handle as wel? Not clear, Visium only uses it for SNE and combined NEG/SNE. -- Eric Botcazou

Re: Canonicalization of compares performed as side-effect operations

2019-08-07 Thread Uros Bizjak
On Tue, Aug 6, 2019 at 11:03 PM Richard Earnshaw (lists) wrote: > > On 06/08/2019 18:39, Uros Bizjak wrote: > > Hello! > > > >> On Tue, Aug 06, 2019 at 05:49:17PM +0100, Richard Earnshaw (lists) wrote: > >>> On 06/08/2019 17:39, Segher Boessenkool wrote: > >> What's wrong with describing the

Re: Canonicalization of compares performed as side-effect operations

2019-08-06 Thread Richard Earnshaw (lists)
On 06/08/2019 18:30, Eric Botcazou wrote: >> Why is it incorrect? It's not canonical, sure. But the cannonical form >> does NOT describe what the instruction does. > > Yes, you run into this when you try to be clever with the carry. For the > Visium port I kludged around it by using: > >

Re: Canonicalization of compares performed as side-effect operations

2019-08-06 Thread Richard Earnshaw (lists)
On 06/08/2019 18:39, Uros Bizjak wrote: > Hello! > >> On Tue, Aug 06, 2019 at 05:49:17PM +0100, Richard Earnshaw (lists) wrote: >>> On 06/08/2019 17:39, Segher Boessenkool wrote: >> What's wrong with describing the canonical form in your MD? You'll need >> some reversed condition code

Re: Canonicalization of compares performed as side-effect operations

2019-08-06 Thread Uros Bizjak
Hello! > On Tue, Aug 06, 2019 at 05:49:17PM +0100, Richard Earnshaw (lists) wrote: >> On 06/08/2019 17:39, Segher Boessenkool wrote: >> >>>What's wrong with describing the canonical form in your MD? You'll need >> >>>some reversed condition code thingy, but that's it? >> >> >> >>It doesn't

Re: Canonicalization of compares performed as side-effect operations

2019-08-06 Thread Eric Botcazou
> Why is it incorrect? It's not canonical, sure. But the cannonical form > does NOT describe what the instruction does. Yes, you run into this when you try to be clever with the carry. For the Visium port I kludged around it by using: [(set (reg:CCC R_FLAGS) (compare:CCC (not:I

Re: Canonicalization of compares performed as side-effect operations

2019-08-06 Thread Segher Boessenkool
On Tue, Aug 06, 2019 at 05:49:17PM +0100, Richard Earnshaw (lists) wrote: > On 06/08/2019 17:39, Segher Boessenkool wrote: > >>>What's wrong with describing the canonical form in your MD? You'll need > >>>some reversed condition code thingy, but that's it? > >> > >>It doesn't describe what the

Re: Canonicalization of compares performed as side-effect operations

2019-08-06 Thread Richard Earnshaw (lists)
On 06/08/2019 17:39, Segher Boessenkool wrote: On Tue, Aug 06, 2019 at 05:22:48PM +0100, Richard Earnshaw (lists) wrote: On 06/08/2019 17:17, Segher Boessenkool wrote: Hi Richard, On Tue, Aug 06, 2019 at 04:35:04PM +0100, Richard Earnshaw (lists) wrote: Arm has an instruction that performs

Re: Canonicalization of compares performed as side-effect operations

2019-08-06 Thread Segher Boessenkool
On Tue, Aug 06, 2019 at 05:22:48PM +0100, Richard Earnshaw (lists) wrote: > On 06/08/2019 17:17, Segher Boessenkool wrote: > >Hi Richard, > > > >On Tue, Aug 06, 2019 at 04:35:04PM +0100, Richard Earnshaw (lists) wrote: > >>Arm has an instruction that performs the following operation: > >> >

Re: Canonicalization of compares performed as side-effect operations

2019-08-06 Thread Richard Earnshaw (lists)
On 06/08/2019 17:22, Richard Earnshaw (lists) wrote: On 06/08/2019 17:17, Segher Boessenkool wrote: Hi Richard, On Tue, Aug 06, 2019 at 04:35:04PM +0100, Richard Earnshaw (lists) wrote: Arm has an instruction that performs the following operation: (parallel [ (set (reg:CC 100 cc)    

Re: Canonicalization of compares performed as side-effect operations

2019-08-06 Thread Richard Earnshaw (lists)
On 06/08/2019 17:17, Segher Boessenkool wrote: Hi Richard, On Tue, Aug 06, 2019 at 04:35:04PM +0100, Richard Earnshaw (lists) wrote: Arm has an instruction that performs the following operation: (parallel [ (set (reg:CC 100 cc) (compare:CC (const_int 0 [0])

Re: Canonicalization of compares performed as side-effect operations

2019-08-06 Thread Segher Boessenkool
Hi Richard, On Tue, Aug 06, 2019 at 04:35:04PM +0100, Richard Earnshaw (lists) wrote: > Arm has an instruction that performs the following operation: > > (parallel [ > (set (reg:CC 100 cc) > (compare:CC (const_int 0 [0]) > (reg:SI 121))) > (set (reg:SI