Re: [PATCH] gfortran: Improve translation of POPPAR intrinsic

2021-11-21 Thread Bernhard Reutner-Fischer via Gcc-patches
On Sun, 21 Nov 2021 19:59:35 +0100 Harald Anlauf wrote: > Let's have a look at the tree-dump of the existing testcase: > > integer(kind=4) runtime_poppar (integer(kind=16) & restrict i) > { >integer(kind=4) res; > >{ > uint128_t D.4221; > > D.4221 = (uint128_t) *i; > res

Re: [PATCH] gfortran: Improve translation of POPPAR intrinsic

2021-11-21 Thread Harald Anlauf via Gcc-patches
Let's have a look at the tree-dump of the existing testcase: integer(kind=4) runtime_poppar (integer(kind=16) & restrict i) { integer(kind=4) res; { uint128_t D.4221; D.4221 = (uint128_t) *i; res = __builtin_parityll ((unsigned long) D.4221 ^ (unsigned long) (D.4221 >> 64)); }

Re: [PATCH] gfortran: Improve translation of POPPAR intrinsic

2021-11-20 Thread Bernhard Reutner-Fischer via Gcc-patches
Roger pinged this on gcc-patches some time ago fwiw. [The commit-hooks will likely fix or ignore s/bext/next/ in his mail-addr] On Sun, 14 Jun 2020 23:39:32 +0100 "Roger Sayle" wrote: > > > The following patch to gfortran's trans-instrinsic.c tweaks the generic that > is produced > > for po

[PATCH] gfortran: Improve translation of POPPAR intrinsic

2020-06-14 Thread Roger Sayle
The following patch to gfortran's trans-instrinsic.c tweaks the generic that is produced for popcnt on integer(kind=16). Currently, the double word popcnt is implemented as parityll(hipart(x))^parityll(lopart(x)), but with this patch this is now translated as parityll(hipart(x)^lopart(x)).