Re: [PATCH] xtensa: Optimize boolean evaluation or branching when EQ/NE to INT_MIN

2023-06-04 Thread Max Filippov via Gcc-patches
On Sat, Jun 3, 2023 at 3:52 PM Takayuki 'January June' Suwa wrote: > > This patch optimizes both the boolean evaluation of and the branching of > EQ/NE against INT_MIN (-2147483648), by taking advantage of the specifi- > cation the ABS machine instruction on Xtensa returns INT_MIN iff INT_MIN, > o

Re: [PATCH] xtensa: Optimize boolean evaluation or branching when EQ/NE to INT_MIN

2023-06-03 Thread Jeff Law via Gcc-patches
On 6/3/23 17:03, Andrew Pinski via Gcc-patches wrote: On Sat, Jun 3, 2023 at 3:53 PM Takayuki 'January June' Suwa via Gcc-patches wrote: This patch optimizes both the boolean evaluation of and the branching of EQ/NE against INT_MIN (-2147483648), by taking advantage of the specifi- cation t

Re: [PATCH] xtensa: Optimize boolean evaluation or branching when EQ/NE to INT_MIN

2023-06-03 Thread Andrew Pinski via Gcc-patches
On Sat, Jun 3, 2023 at 3:53 PM Takayuki 'January June' Suwa via Gcc-patches wrote: > > This patch optimizes both the boolean evaluation of and the branching of > EQ/NE against INT_MIN (-2147483648), by taking advantage of the specifi- > cation the ABS machine instruction on Xtensa returns INT_MIN

[PATCH] xtensa: Optimize boolean evaluation or branching when EQ/NE to INT_MIN

2023-06-03 Thread Takayuki 'January June' Suwa via Gcc-patches
This patch optimizes both the boolean evaluation of and the branching of EQ/NE against INT_MIN (-2147483648), by taking advantage of the specifi- cation the ABS machine instruction on Xtensa returns INT_MIN iff INT_MIN, otherwise non-negative value. /* example */ int test0(int x) { r