Hi,
I'm working on porting AVR to MODE_CC, and there are quite a few
patterns that clobber the condition code reg only for certain
constraint alternatives. For e.g.,
(define_insn "mov_insn"
[(set (match_operand:ALL1 0 "nonimmediate_operand" "=r,d,Qm ,r
,q,r,*r")
(match_
On 8/14/20 4:16 AM, Senthil Kumar Selvaraj via Gcc wrote:
Hi,
I'm working on porting AVR to MODE_CC, and there are quite a few
patterns that clobber the condition code reg only for certain
constraint alternatives. For e.g.,
(define_insn "mov_insn"
[(set (match_operand:ALL1 0 "nonimm
Hi!
On Fri, Aug 14, 2020 at 04:46:59PM +0530, Senthil Kumar Selvaraj via Gcc wrote:
> I'm working on porting AVR to MODE_CC,
I'm very happy to see people work on that.
> (define_insn "*mov_insn_noclobber_flags"
> [(set (match_operand:ALL1 0 "nonimmediate_operand" "=r,d ,q,r")
> (ma
On Fri, Aug 14, 2020 at 3:33 PM Matt Wette via Gcc wrote:
> Happy to see someone working this. Are you starting with one CC mode?
I'm also working on this (mostly at bug#92792), and so far am using
two modes: the general reg:CC mode for proper comparison insns, and
CCNZ for optimization in the
On Fri, Aug 14, 2020 at 4:24 PM Segher Boessenkool
wrote:
> On Fri, Aug 14, 2020 at 04:46:59PM +0530, Senthil Kumar Selvaraj via Gcc
> wrote:
> > (define_insn "*mov_insn_noclobber_flags"
> > [(set (match_operand:ALL1 0 "nonimmediate_operand" "=r,d ,q,r")
> > (match_operand:ALL1 1 "nox
Hi!
On Fri, Aug 14, 2020 at 05:47:02PM +, Pip Cet wrote:
> On Fri, Aug 14, 2020 at 4:24 PM Segher Boessenkool
> wrote:
> > On Fri, Aug 14, 2020 at 04:46:59PM +0530, Senthil Kumar Selvaraj via Gcc
> > wrote:
> > > (define_insn "*mov_insn_noclobber_flags"
> > > [(set (match_operand:ALL1 0 "n
On Sat, Aug 15, 2020 at 12:30 AM Segher Boessenkool
wrote:
> On Fri, Aug 14, 2020 at 05:47:02PM +, Pip Cet wrote:
> > On Fri, Aug 14, 2020 at 4:24 PM Segher Boessenkool
> > wrote:
> > > If you want to say some alternative does not clobber anything, just use
> > > the constraint "X" for that a
On Sat, Aug 15, 2020 at 10:18:27AM +, Pip Cet wrote:
> > > What I'm currently doing is this:
> > >
> > > (define_split
> > > [(set (match_operand 0 "nonimmediate_operand")
> > > (match_operand 1 "nox_general_operand"))]
> > > "reload_completed && mov_clobbers_cc (insn, operands)"
> > >
On Fri, 14 Aug 2020, Senthil Kumar Selvaraj via Gcc wrote:
> As you can deduce from the (set_attr "cc" ..), only constraint
> alternatives 0,2,3 and 6 clobber CC - others leave it unchanged.
Yes, I recognize that.
> My first version of the port adds a post-reload splitter that adds a
> (clobber (
On Sun, Aug 16, 2020 at 12:50 AM Segher Boessenkool
wrote:
> On Sat, Aug 15, 2020 at 10:18:27AM +, Pip Cet wrote:
> > > > What I'm currently doing is this:
> > > >
> > > > (define_split
> > > > [(set (match_operand 0 "nonimmediate_operand")
> > > > (match_operand 1 "nox_general_operand")
Pip Cet writes:
> On Sun, Aug 16, 2020 at 12:50 AM Segher Boessenkool
> wrote:
>> On Sat, Aug 15, 2020 at 10:18:27AM +, Pip Cet wrote:
>> > > > What I'm currently doing is this:
>> > > >
>> > > > (define_split
>> > > > [(set (match_operand 0 "nonimmediate_operand")
>> > > > (match_ope
On Mon, Aug 17, 2020 at 7:31 AM Senthil Kumar Selvaraj
wrote:
> > (define_split
> > [(parallel [(set (match_operand:ALL1 0 "nonimmediate_operand")
> > (match_operand:ALL1 1 "nox_general_operand"))
> > (clobber (reg:CC REG_CC))])]
> > "reload_completed && REG_P (operands[
On Fri, 2020-08-14 at 16:46 +0530, Senthil Kumar Selvaraj wrote:
> Hi,
>
> I'm working on porting AVR to MODE_CC, and there are quite a few
> patterns that clobber the condition code reg only for certain
> constraint alternatives. For e.g.,
Yea. H8 has the same issue. It's worth noting tha
Hi!
On Sun, Aug 16, 2020 at 06:28:44PM +, Pip Cet wrote:
> > > IIUC, the idea is that references to REG_CC, except for clobbers, are
> > > only introduced in the post-reload split pass, so it cannot be live
> > > before our define_split runs. Does that make sense?
> >
> > Yes, it does. It has
Pip Cet writes:
> On Mon, Aug 17, 2020 at 7:31 AM Senthil Kumar Selvaraj
> wrote:
>> > (define_split
>> > [(parallel [(set (match_operand:ALL1 0 "nonimmediate_operand")
>> > (match_operand:ALL1 1 "nox_general_operand"))
>> > (clobber (reg:CC REG_CC))])]
>> > "reload_c
On Sun, 16 Aug 2020, Pip Cet via Gcc wrote:
> For example, here's what I currently have:
>
> (define_expand "mov"
> [(parallel [(set (match_operand:MOVMODE 0 "nonimmediate_operand" "")
>(match_operand:MOVMODE 1 "general_operand" ""))
> (clobber (reg:CC REG_CC))])]
> ...)
Hans-Peter Nilsson writes:
> On Fri, 14 Aug 2020, Senthil Kumar Selvaraj via Gcc wrote:
>> As you can deduce from the (set_attr "cc" ..), only constraint
>> alternatives 0,2,3 and 6 clobber CC - others leave it unchanged.
>
> Yes, I recognize that.
>
>> My first version of the port adds a post-r
On Wed, 19 Aug 2020, Senthil Kumar Selvaraj wrote:
>
> Hans-Peter Nilsson writes:
>
> > On Fri, 14 Aug 2020, Senthil Kumar Selvaraj via Gcc wrote:
> >> As you can deduce from the (set_attr "cc" ..), only constraint
> >> alternatives 0,2,3 and 6 clobber CC - others leave it unchanged.
> >
> > Yes, I
Hans-Peter Nilsson writes:
> On Wed, 19 Aug 2020, Senthil Kumar Selvaraj wrote:
>>
>> Hans-Peter Nilsson writes:
>>
>> > On Fri, 14 Aug 2020, Senthil Kumar Selvaraj via Gcc wrote:
>> >> As you can deduce from the (set_attr "cc" ..), only constraint
>> >> alternatives 0,2,3 and 6 clobber CC - oth
On 20/08/2020 06:40, Senthil Kumar Selvaraj via Gcc wrote:
What I didn't understand was the (set-attr "cc")
part - as far I can tell, this results in (set_attr "cc_enabled" ...) in
all of the three substituted patterns, so I wondered why not just have
(set_attr "cc_enabled" ...) in the original d
On Thu, Aug 20, 2020 at 1:53 AM Andrew Stubbs wrote:
>
> On 20/08/2020 06:40, Senthil Kumar Selvaraj via Gcc wrote:
> > What I didn't understand was the (set-attr "cc")
> > part - as far I can tell, this results in (set_attr "cc_enabled" ...) in
> > all of the three substituted patterns, so I wond
On Tue, Aug 18, 2020 at 6:52 AM Senthil Kumar Selvaraj
wrote:
> > recognize such insns, but as it stands that define_insn would
> > recognize the incorrect insn:
> >
> > [(set (reg:QI 0) (const_int 0))
> > (clobber (scratch:CC))]
>
> get_cc_reg_clobber_rtx also looks at the insn itself (i.e. what
Pip Cet writes:
> On Tue, Aug 18, 2020 at 6:52 AM Senthil Kumar Selvaraj
> wrote:
>> > recognize such insns, but as it stands that define_insn would
>> > recognize the incorrect insn:
>> >
>> > [(set (reg:QI 0) (const_int 0))
>> > (clobber (scratch:CC))]
>>
>> get_cc_reg_clobber_rtx also looks
On Thu, 20 Aug 2020, Senthil Kumar Selvaraj wrote:
> What I didn't understand was the (set-attr "cc")
> part - as far I can tell, this results in (set_attr "cc_enabled" ...) in
> all of the three substituted patterns, so I wondered why not just have
> (set_attr "cc_enabled" ...) in the original de
On Thu, 2020-08-20 at 21:36 +0530, Senthil Kumar Selvaraj via Gcc wrote:
> Pip Cet writes:
>
> > On Tue, Aug 18, 2020 at 6:52 AM Senthil Kumar Selvaraj
> > wrote:
> > > > recognize such insns, but as it stands that define_insn would
> > > > recognize the incorrect insn:
> > > >
> > > > [(set (re
On Mon, 24 Aug 2020, Jeff Law via Gcc wrote:
> On Thu, 2020-08-20 at 21:36 +0530, Senthil Kumar Selvaraj via Gcc wrote:
> > The post-reload splitter introduces the clobber. The wiki
> > suggests that approach if most insns clobber REG_CC, perhaps because of
> > the missed optimizations you describe
On Mon, Aug 24, 2020 at 6:18 PM Jeff Law wrote:
> > The post-reload splitter introduces the clobber. The wiki
> > suggests that approach if most insns clobber REG_CC, perhaps because of
> > the missed optimizations you describe below?
> If most patterns set/clobber the flags, then yes, it's slight
On Tue, 2020-08-25 at 23:58 -0400, Hans-Peter Nilsson wrote:
> On Mon, 24 Aug 2020, Jeff Law via Gcc wrote:
> > On Thu, 2020-08-20 at 21:36 +0530, Senthil Kumar Selvaraj via Gcc wrote:
> > > The post-reload splitter introduces the clobber. The wiki
> > > suggests that approach if most insns clobber
On Wed, 2020-08-26 at 11:18 +, Pip Cet wrote:
> On Mon, Aug 24, 2020 at 6:18 PM Jeff Law wrote:
> > > The post-reload splitter introduces the clobber. The wiki
> > > suggests that approach if most insns clobber REG_CC, perhaps because of
> > > the missed optimizations you describe below?
> > I
On Wed, 26 Aug 2020, Jeff Law wrote:
> On Tue, 2020-08-25 at 23:58 -0400, Hans-Peter Nilsson wrote:
> > On Mon, 24 Aug 2020, Jeff Law via Gcc wrote:
> > > On Thu, 2020-08-20 at 21:36 +0530, Senthil Kumar Selvaraj via Gcc wrote:
> > > > The post-reload splitter introduces the clobber. The wiki
> >
On Thu, 2020-08-27 at 16:31 +0530, Senthil Kumar Selvaraj wrote:
> Pip Cet writes:
>
> > On Mon, Aug 24, 2020 at 6:18 PM Jeff Law wrote:
> > > > The post-reload splitter introduces the clobber. The wiki
> > > > suggests that approach if most insns clobber REG_CC, perhaps because of
> > > > the mi
On Wed, 26 Aug 2020, Pip Cet via Gcc wrote:
> Note that whether there is a CC-setting variant depends not just on
> the "cc" attr, but also on the precise operands for some values of the
> "cc" attr, which requires hairy C code to figure out.
>
> Is it possible to avoid this situation by avoiding
32 matches
Mail list logo