Re: [PATCH] i386: Change RTL representation of bt[lq] [PR118623]

2025-02-10 Thread Uros Bizjak
On Mon, Feb 10, 2025 at 10:09 AM Eric Botcazou wrote: > > > So, would it be better to represent *bt as > > (set (reg:CCC FLAGS_REG) > > (compare:CCC (not:SWI48 (zero_extract:SWI48 ...)) (const_int -1))) > > rather than > > (set (reg:CCC FLAGS_REG) > > (compare:CCC (const_int 0) (zero_ext

Re: [PATCH] i386: Change RTL representation of bt[lq] [PR118623]

2025-02-10 Thread Eric Botcazou
> So, would it be better to represent *bt as > (set (reg:CCC FLAGS_REG) > (compare:CCC (not:SWI48 (zero_extract:SWI48 ...)) (const_int -1))) > rather than > (set (reg:CCC FLAGS_REG) > (compare:CCC (const_int 0) (zero_extract:SWI48 ...))) > ? FWIW the SPARC port uses the former variant wi

Re: [PATCH] i386: Change RTL representation of bt[lq] [PR118623]

2025-02-10 Thread Uros Bizjak
On Mon, Feb 10, 2025 at 9:46 AM Jakub Jelinek wrote: > > On Mon, Feb 10, 2025 at 12:26:03AM +0100, Uros Bizjak wrote: > > On Sun, Feb 9, 2025 at 11:31 PM Jakub Jelinek wrote: > > > > > > On Sun, Feb 09, 2025 at 09:24:30AM +0100, Uros Bizjak wrote: > > > > "For commutative and comparison operators

Re: [PATCH] i386: Change RTL representation of bt[lq] [PR118623]

2025-02-10 Thread Jakub Jelinek
On Mon, Feb 10, 2025 at 12:26:03AM +0100, Uros Bizjak wrote: > On Sun, Feb 9, 2025 at 11:31 PM Jakub Jelinek wrote: > > > > On Sun, Feb 09, 2025 at 09:24:30AM +0100, Uros Bizjak wrote: > > > "For commutative and comparison operators, a constant is always made > > > the second operand." > > > > Isn

Re: [PATCH] i386: Change RTL representation of bt[lq] [PR118623]

2025-02-09 Thread Uros Bizjak
On Sun, Feb 9, 2025 at 11:31 PM Jakub Jelinek wrote: > > On Sun, Feb 09, 2025 at 09:24:30AM +0100, Uros Bizjak wrote: > > "For commutative and comparison operators, a constant is always made > > the second operand." > > Isn't that just for commutative comparison operators (eq, ne, ordered, > unord

Re: [PATCH] i386: Change RTL representation of bt[lq] [PR118623]

2025-02-09 Thread Jakub Jelinek
On Sun, Feb 09, 2025 at 09:24:30AM +0100, Uros Bizjak wrote: > "For commutative and comparison operators, a constant is always made > the second operand." Isn't that just for commutative comparison operators (eq, ne, ordered, unordered, ltgt, uneq)? Compare itself even isn't RTX_COMPARE at all, i

Re: [PATCH] i386: Change RTL representation of bt[lq] [PR118623]

2025-02-09 Thread Uros Bizjak
On Sat, Feb 8, 2025 at 9:40 AM Jakub Jelinek wrote: > > Hi! > > The following testcase is miscompiled because of RTL represententation > of bt{l,q} insn followed by e.g. j{c,nc} being misleading to what it > actually does. > Let's look e.g. at > (define_insn_and_split "*jcc_bt" > [(set (pc) >

[PATCH] i386: Change RTL representation of bt[lq] [PR118623]

2025-02-08 Thread Jakub Jelinek
Hi! The following testcase is miscompiled because of RTL represententation of bt{l,q} insn followed by e.g. j{c,nc} being misleading to what it actually does. Let's look e.g. at (define_insn_and_split "*jcc_bt" [(set (pc) (if_then_else (match_operator 0 "bt_comparison_operator"