Re: [PATCH] rs6000, vector integer multiply/divide/modulo instructions

2020-11-19 Thread Segher Boessenkool
On Wed, Nov 04, 2020 at 08:44:03AM -0800, Carl Love wrote: > +#define vec_mulh(a, b) __builtin_vec_mulh (a, b) > +#define vec_div(a, b) __builtin_vec_div (a, b) > +#define vec_dive(a, b) __builtin_vec_dive (a, b) > +#define vec_mod(a, b) __builtin_vec_mod (a, b) This should be #define vec_mulh(a,

Re: [PATCH] rs6000, vector integer multiply/divide/modulo instructions

2020-11-19 Thread Segher Boessenkool
On Thu, Nov 19, 2020 at 11:25:08AM -0600, Pat Haugen wrote: > > +(define_insn "vmodu_" > > + [(set (match_operand:VIlong 0 "vsx_register_operand" "=v") > > + (umod:VIlong (match_operand:VIlong 1 "vsx_register_operand" "v") > > +(match_operand:VIlong 2 "vsx_register_operand" "v"))

Re: [PATCH] rs6000, vector integer multiply/divide/modulo instructions

2020-11-19 Thread Pat Haugen via Gcc-patches
On 11/4/20 10:44 AM, Carl Love via Gcc-patches wrote: > + > +(define_insn "vdives_" > + [(set (match_operand:VIlong 0 "vsx_register_operand" "=v") > +(unspec:VIlong [(match_operand:VIlong 1 "vsx_register_operand" "v") > + (match_operand:VIlong 2 "vsx_register_operand" "

Re: [PATCH] rs6000, vector integer multiply/divide/modulo instructions

2020-11-18 Thread David Edelsohn via Gcc-patches
On Wed, Nov 4, 2020 at 11:44 AM Carl Love wrote: > > David: > > I have reworked the patch moving the new vector instruction patterns to > vsx.md. Also, cleaned up the vector division instructions. The > div3 pattern definitions are the only ones that should be > defined. > > I have retested the

RE: [PATCH] rs6000, vector integer multiply/divide/modulo instructions

2020-11-04 Thread Carl Love via Gcc-patches
David: I have reworked the patch moving the new vector instruction patterns to vsx.md. Also, cleaned up the vector division instructions. The div3 pattern definitions are the only ones that should be defined. I have retested the patch on: powerpc64le-unknown-linux-gnu (Power 9 LE) with n

RE: [PATCH] rs6000, vector integer multiply/divide/modulo instructions

2020-11-02 Thread Carl Love via Gcc-patches
David: > > Hi, Carl > > I thought that vector.md was a transfer vector for the patterns and > instructions were defined in vsx.md. Why are the new insn patterns > defined in vector.md? I am a bit of a newbie here. I wasn't aware of any specific guide lines on the vector instructions. I put

Re: [PATCH] rs6000, vector integer multiply/divide/modulo instructions

2020-10-31 Thread David Edelsohn via Gcc-patches
On Fri, Oct 30, 2020 at 4:07 PM Carl Love wrote: > > GCC maintainers: > > The following patch adds new builtins for the vector integer multiply, > divide and modulo operations. The builtins are: > vec_mulh(), vec_div(), vec_dive(), vec_mod() for signed and unsigned > integers and long long intege

RE: [PATCH] rs6000, vector integer multiply/divide/modulo instructions

2020-10-30 Thread Carl Love via Gcc-patches
On Fri, 2020-10-30 at 17:05 -0400, David Edelsohn wrote: > On Fri, Oct 30, 2020 at 4:07 PM Carl Love wrote: > > > diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-1-p10- > > runnable.c b/gcc/testsuite/gcc.target/powerpc/builtins-1-p10- > > runnable.c > > new file mode 100644 > > index 0

Re: [PATCH] rs6000, vector integer multiply/divide/modulo instructions

2020-10-30 Thread David Edelsohn via Gcc-patches
On Fri, Oct 30, 2020 at 4:07 PM Carl Love wrote: > diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-1-p10-runnable.c > b/gcc/testsuite/gcc.target/powerpc/builtins-1-p10-runnable.c > new file mode 100644 > index 000..549bc742d12 > --- /dev/null > +++ b/gcc/testsuite/gcc.target/power

[PATCH] rs6000, vector integer multiply/divide/modulo instructions

2020-10-30 Thread Carl Love via Gcc-patches
GCC maintainers: The following patch adds new builtins for the vector integer multiply, divide and modulo operations. The builtins are: vec_mulh(), vec_div(), vec_dive(), vec_mod() for signed and unsigned integers and long long integers. Support for signed and unsigned long long integers the e