Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-29 Thread Martin Liška
On 6/21/22 14:08, Richard Biener via Gcc-patches wrote: On Tue, Jun 21, 2022 at 12:05 PM Xionghu Luo wrote: On 2022/6/21 15:33, Richard Biener via Gcc-patches wrote: On Tue, Jun 21, 2022 at 5:06 AM xionghuluo(罗雄虎) via Gcc-patches wrote: Bootstrap and regression tested pass on

Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-21 Thread Richard Biener via Gcc-patches
On Tue, Jun 21, 2022 at 12:05 PM Xionghu Luo wrote: > > > > On 2022/6/21 15:33, Richard Biener via Gcc-patches wrote: > > On Tue, Jun 21, 2022 at 5:06 AM xionghuluo(罗雄虎) via Gcc-patches > > wrote: > >> > >> > >> Bootstrap and regression tested pass on x86_64-linux-gnu, OK for master? > > > > OK

Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-21 Thread Xionghu Luo via Gcc-patches
On 2022/6/21 15:42, Martin Liška wrote: On 6/21/22 09:33, Xi Ruoyao wrote: On Tue, 2022-06-21 at 09:28 +0200, Martin Liška wrote: Sorry, but I don't see to which email this replies to? Can't find a patch. https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596913.html Hm, interesting.

Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-21 Thread Xionghu Luo via Gcc-patches
On 2022/6/21 15:33, Richard Biener via Gcc-patches wrote: On Tue, Jun 21, 2022 at 5:06 AM xionghuluo(罗雄虎) via Gcc-patches wrote: Bootstrap and regression tested pass on x86_64-linux-gnu, OK for master? OK if you add a comment that an empty conditions_in_bbs indicates we are processing

Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-21 Thread Martin Liška
On 6/21/22 09:33, Xi Ruoyao wrote: > On Tue, 2022-06-21 at 09:28 +0200, Martin Liška wrote: > >> Sorry, but I don't see to which email this replies to? >> Can't find a patch. > > https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596913.html Hm, interesting. It means Thunderbird can't deal

Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-21 Thread Xi Ruoyao via Gcc-patches
On Tue, 2022-06-21 at 09:28 +0200, Martin Liška wrote: > Sorry, but I don't see to which email this replies to? > Can't find a patch. https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596913.html The patch is an attachment:

Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-21 Thread Richard Biener via Gcc-patches
On Tue, Jun 21, 2022 at 5:06 AM xionghuluo(罗雄虎) via Gcc-patches wrote: > > Current GCC generates: > > > test2: > .LFB0: > .cfi_startproc > xorl %edx, %edx > cmpl $3, (%rdi) > jle .L1 > movl 16(%rdi), %eax > cmpl $1, %eax > je .L4 > subl $2, %eax > cmpl

Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-21 Thread Martin Liška
On 6/21/22 05:44, Xionghu Luo via Gcc-patches wrote: > Correct the format... > >  test2: > .LFB0: >         .cfi_startproc >         xorl    %edx, %edx >         cmpl    $3, (%rdi) >         jle     .L1 >         movl    16(%rdi), %eax >         cmpl    $1, %eax >         je      .L4 >        

Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-20 Thread Xionghu Luo via Gcc-patches
Correct the format...  test2: .LFB0:         .cfi_startproc         xorl    %edx, %edx         cmpl    $3, (%rdi)         jle     .L1         movl    16(%rdi), %eax         cmpl    $1, %eax         je      .L4         subl    $2, %eax         cmpl    $4, %eax         ja      .L1         movl    

[PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-20 Thread 罗雄虎
Current GCC generates: test2: .LFB0: .cfi_startproc xorl %edx, %edx cmpl $3, (%rdi) jle .L1 movl 16(%rdi), %eax cmpl $1, %eax je .L4 subl $2, %eax cmpl $4, %eax ja .L1 movl CSWTCH.1(,%rax,4), %edx .L1: movl %edx, %eax ret