Re: [PATCH] match.pd: Optimize __builtin_mul_overflow_p (x, cst, (stype)0) [PR105777]

2022-06-03 Thread Jakub Jelinek via Gcc-patches
On Thu, Jun 02, 2022 at 01:46:25PM +, Richard Biener wrote: > > Starting x86_64-linux and i686-linux bootstrap/regtest, ok for trunk if > > it passes them? > > OK. Testing found one special case that wasn't handled correctly in the patch, when @1 is -1, INT_MIN / -1 during the lo computation

Re: [PATCH] match.pd: Optimize __builtin_mul_overflow_p (x, cst, (stype)0) [PR105777]

2022-06-02 Thread Richard Biener via Gcc-patches
On Thu, 2 Jun 2022, Jakub Jelinek wrote: > Hi! > > The following patch is an incremental change to the PR30314 enhancement, > this one handles signed types. > For signed types (but still, the same for 1st and result element type > and non-zero constant that fits into that type), we actually need

[PATCH] match.pd: Optimize __builtin_mul_overflow_p (x, cst, (stype)0) [PR105777]

2022-06-02 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch is an incremental change to the PR30314 enhancement, this one handles signed types. For signed types (but still, the same for 1st and result element type and non-zero constant that fits into that type), we actually need to watch for overflow in direction to positive and