Re: [PATCH v1 1/2] Simplify shifts wider than the bitwidth of types

2020-11-17 Thread Philipp Tomsich via Gcc-patches
Jeff, On Tue, 17 Nov 2020 at 16:56, Jeff Law wrote: > > Note that in his comment to patch 2/2, Jim has noted that user code for > > RISC-V may assume a truncation of the shift-operand... > What I'd suggest doing would be to leave the invalid shift count in the > IL in VRP, then extend the erroneo

Re: [PATCH v1 1/2] Simplify shifts wider than the bitwidth of types

2020-11-17 Thread Philipp Tomsich via Gcc-patches
Jakub, On Tue, 17 Nov 2020 at 16:56, Jeff Law wrote: > > > > On 11/17/20 4:53 AM, Philipp Tomsich wrote: > > Jeff, > > > > On Tue, 17 Nov 2020 at 00:38, Jeff Law > > wrote: > > > > > > On 11/16/20 11:57 AM, Philipp Tomsich wrote: > > > From: Philipp Tomsich mailto

Re: [PATCH] match.pd: undistribute (a << s) & C, when C = (M << s) and exact_log2(M - 1)

2020-11-11 Thread Philipp Tomsich via Gcc-patches
Jakub, On Wed, 11 Nov 2020 at 11:31, Jakub Jelinek wrote: > > On Wed, Nov 11, 2020 at 11:17:32AM +0100, Philipp Tomsich wrote: > > From: Philipp Tomsich > > > > The function > > long f(long a) > > { > > return(a & 0xull) << 3; > > } > > is folded into > > _1 = a_2(D