On Wed, Jun 21, 2017 at 08:59:29AM +0200, Richard Biener wrote:
> Actually I was looking for a bit more generic
>
> bool
> target_supports_op_p (tree type, enum tree_code code,
> enum optab_subtype = optab_default)
> {
> optab ot = optab_for_tree_code (code, type, optab_subty
On Tue, 20 Jun 2017, James Greenhalgh wrote:
>
> On Fri, Jun 16, 2017 at 11:41:57AM +0200, Richard Biener wrote:
> > On Fri, 16 Jun 2017, James Greenhalgh wrote:
> > > On Mon, Jun 12, 2017 at 03:56:25PM +0200, Richard Biener wrote:
> > > > + We can't do the same for signed A, as it might be neg
On Fri, Jun 16, 2017 at 11:41:57AM +0200, Richard Biener wrote:
> On Fri, 16 Jun 2017, James Greenhalgh wrote:
> > On Mon, Jun 12, 2017 at 03:56:25PM +0200, Richard Biener wrote:
> > > + We can't do the same for signed A, as it might be negative, which
> > > would
> > > + introduce undefined b
On Fri, 16 Jun 2017, James Greenhalgh wrote:
>
> On Mon, Jun 12, 2017 at 03:56:25PM +0200, Richard Biener wrote:
> > On Mon, 12 Jun 2017, James Greenhalgh wrote:
> >
> > >
> > > Hi,
> > >
> > > As subject, for the testcase in the patch:
> > >
> > > unsigned long
> > > f2 (unsigned long a, int
On Mon, Jun 12, 2017 at 03:56:25PM +0200, Richard Biener wrote:
> On Mon, 12 Jun 2017, James Greenhalgh wrote:
>
> >
> > Hi,
> >
> > As subject, for the testcase in the patch:
> >
> > unsigned long
> > f2 (unsigned long a, int b)
> > {
> > unsigned long x = 1UL << b;
> > return a / x
On Mon, 12 Jun 2017, James Greenhalgh wrote:
>
> Hi,
>
> As subject, for the testcase in the patch:
>
> unsigned long
> f2 (unsigned long a, int b)
> {
> unsigned long x = 1UL << b;
> return a / x;
> }
>
> We currently generate:
>
> f2:
> mov x2, 1
> lsl
Hi,
As subject, for the testcase in the patch:
unsigned long
f2 (unsigned long a, int b)
{
unsigned long x = 1UL << b;
return a / x;
}
We currently generate:
f2:
mov x2, 1
lsl x1, x2, x1
udivx0, x0, x1
ret
Which could instead be tr