Re: [PATCH] lround for PowerPC

2015-11-24 Thread Michael Meissner
On Mon, Nov 23, 2015 at 07:04:33PM -0500, David Edelsohn wrote: > Okay with those changes, after the cause of the SEGV is diagnosed and fixed. It must have a temporary failure (either in the source, or perhaps something was amiss on the machine I was building on). I checked out a new trunk, and b

Re: [PATCH] lround for PowerPC

2015-11-24 Thread David Edelsohn
On Tue, Nov 24, 2015 at 1:55 PM, Michael Meissner wrote: > Whoops, I forgot to update the ChangeLog after reversing Fv and Fv2. > > 2015-11-24 David Edelsohn > Michael Meissner > > * config/rs6000/rs6000.md (UNSPEC_XSRDPI): New unspec. > (Fv2): New mode attribute t

Re: [PATCH] lround for PowerPC

2015-11-24 Thread Michael Meissner
Whoops, I forgot to update the ChangeLog after reversing Fv and Fv2. 2015-11-24 David Edelsohn Michael Meissner * config/rs6000/rs6000.md (UNSPEC_XSRDPI): New unspec. (Fv2): New mode attribute to be used when ISA 2.07 instructions are used on SF values, an

Re: [PATCH] lround for PowerPC

2015-11-24 Thread Michael Meissner
On Mon, Nov 23, 2015 at 07:04:33PM -0500, David Edelsohn wrote: > I would prefer that you reverse the meaning of "Fv" and "Fv2". "Fv" > corresponds to VSX2 and "Fv2" corresponds to VSX, which is confusing > for anyone trying to make sense of this in the future. > > Also, the lrounddi2 pattern sho

Re: [PATCH] lround for PowerPC

2015-11-23 Thread Michael Meissner
Segher Boessenkool reminded me that the lround define_expand should not have the wa and =d constraints. This patch fixes that problem. The little endian power8 system has passed the bootstrap and make check tests. The big endian power7 system is chugging away on the stage2 build if I use a more

Re: [PATCH] lround for PowerPC

2015-11-23 Thread David Edelsohn
On Mon, Nov 23, 2015 at 4:56 PM, Michael Meissner wrote: > David ping'ed me on internal IRC, and I had a thinko in terms of the use of > the > mode attribute. In some of the uses (such as abs, smax, etc.) we want to > use ISA 2.06 instructions on SFmode, while in other uses (add, mul, etc.) we

Re: [PATCH] lround for PowerPC

2015-11-23 Thread Michael Meissner
David ping'ed me on internal IRC, and I had a thinko in terms of the use of the mode attribute. In some of the uses (such as abs, smax, etc.) we want to use ISA 2.06 instructions on SFmode, while in other uses (add, mul, etc.) we want to use it only if we have the ISA 2.07 instrucitons. I have s

Re: [PATCH] lround for PowerPC

2015-11-22 Thread David Edelsohn
v2 of the patch. Seems to pass the GCC testsuite, although the testsuite doesn't stress FP. There is something wrong with current VSX SFmode constraints. Index: rs6000.md === --- rs6000.md (revision 230723) +++ rs6000.md (working co

Re: [PATCH] lround for PowerPC

2015-11-22 Thread David Edelsohn
On Sun, Nov 22, 2015 at 2:34 AM, Richard Biener wrote: > On November 22, 2015 2:52:53 AM GMT+01:00, David Edelsohn > wrote: >>PowerPC was missing a definition of the lroundMN pattern, which can be >>implemented with VSX instructions available in Power7. Below is a >>first draft. > Why unsafe-

Re: [PATCH] lround for PowerPC

2015-11-21 Thread Richard Biener
On November 22, 2015 2:52:53 AM GMT+01:00, David Edelsohn wrote: >PowerPC was missing a definition of the lroundMN pattern, which can be >implemented with VSX instructions available in Power7. Below is a >first draft. > >- David > >* config/rs6000/rs6000.md (*xsrdpidf2): New define_insn. >(lrou

[PATCH] lround for PowerPC

2015-11-21 Thread David Edelsohn
PowerPC was missing a definition of the lroundMN pattern, which can be implemented with VSX instructions available in Power7. Below is a first draft. - David * config/rs6000/rs6000.md (*xsrdpidf2): New define_insn. (lrounddfdi2): New define_expand. diff --git a/gcc/config/rs6000/rs6000.md b/gc