Re: x86 inc/dec on core2

2007-04-09 Thread H. J. Lu
On Mon, Apr 09, 2007 at 11:13:17AM -0700, H. J. Lu wrote: > On Mon, Apr 09, 2007 at 10:51:22AM -0700, Mike Stump wrote: > > On Apr 8, 2007, at 8:51 PM, Zuxy Meng wrote: > > >Intel's optimization reference manual says that: > > > > I wasn't going off the documentation... I'd be more interested in

Re: x86 inc/dec on core2

2007-04-09 Thread Vladimir N. Makarov
Zuxy Meng wrote: "Mike Stump" <[EMAIL PROTECTED]> ??:[EMAIL PROTECTED] On Apr 8, 2007, at 2:37 AM, Uros Bizjak wrote: My docs say that "INC/DEC does not change the carry flag". Personally, I'm having a hard time envisioning how the semantics of the instruction are relevant

Re: x86 inc/dec on core2

2007-04-09 Thread H. J. Lu
On Mon, Apr 09, 2007 at 10:51:22AM -0700, Mike Stump wrote: > On Apr 8, 2007, at 8:51 PM, Zuxy Meng wrote: > >Intel's optimization reference manual says that: > > I wasn't going off the documentation... I'd be more interested in > either benchmarks or in recommendations by Intel people that kno

Re: x86 inc/dec on core2

2007-04-09 Thread Mike Stump
On Apr 8, 2007, at 8:51 PM, Zuxy Meng wrote: Intel's optimization reference manual says that: I wasn't going off the documentation... I'd be more interested in either benchmarks or in recommendations by Intel people that know the details of the core2 and the performance impact of those det

Re: x86 inc/dec on core2

2007-04-08 Thread Zuxy Meng
"Mike Stump" <[EMAIL PROTECTED]> ??:[EMAIL PROTECTED] > On Apr 8, 2007, at 2:37 AM, Uros Bizjak wrote: >> My docs say that "INC/DEC does not change the carry flag". > > Personally, I'm having a hard time envisioning how the semantics of the > instruction are relevant at all. This is all abo

Re: x86 inc/dec on core2

2007-04-08 Thread Vladimir N. Makarov
Mike Stump wrote: I was wondering, if: /* X86_TUNE_USE_INCDEC */ ~(m_PENT4 | m_NOCONA | m_CORE2 | m_GENERIC), is correct. Should it be: /* X86_TUNE_USE_INCDEC */ ~(m_PENT4 | m_NOCONA | m_GENERIC), ? In the original patch in: 2006-11-18 Vladimir Makarov <[EMAIL PROTECTED]>

Re: x86 inc/dec on core2

2007-04-08 Thread Uros Bizjak
Mike Stump wrote: But you have better resources that I, so if you think that C2D should be left out of X86_TUNE_USE_INCDEC, then the patch is pre-approved for mainline. I'm confused again, it isn't that it should be left out, it is that it should be included. My patch adds inc/dec selection

Re: x86 inc/dec on core2

2007-04-08 Thread Robert Dewar
Mike Stump wrote: On Apr 8, 2007, at 2:37 AM, Uros Bizjak wrote: My docs say that "INC/DEC does not change the carry flag". Personally, I'm having a hard time envisioning how the semantics of the instruction are relevant at all. This is all about instructing tuning, so, semantics cannot m

Re: x86 inc/dec on core2

2007-04-08 Thread Mike Stump
On Apr 8, 2007, at 2:37 AM, Uros Bizjak wrote: My docs say that "INC/DEC does not change the carry flag". Personally, I'm having a hard time envisioning how the semantics of the instruction are relevant at all. This is all about instructing tuning, so, semantics cannot matter, otherwise, i

Re: x86 inc/dec on core2

2007-04-08 Thread H. J. Lu
On Sun, Apr 08, 2007 at 11:37:43AM +0200, Uros Bizjak wrote: > H. J. Lu wrote: > > >>>inc/dec has the same performance as add/sub on Core 2 Duo. But > >>>inc/dec is shorter. > >>> > >>> > >>What about partial flag register dependency of inc/dec? > >> > > > >There is no partial flag regi

Re: x86 inc/dec on core2

2007-04-08 Thread Robert Dewar
Uros Bizjak wrote: My docs say that "INC/DEC does not change the carry flag". But you have better resources that I, so if you think that C2D should be left out of X86_TUNE_USE_INCDEC, then the patch is pre-approved for mainline. Absolutely INC/DEC do not change the carry flag, this is an impo

Re: x86 inc/dec on core2

2007-04-08 Thread Uros Bizjak
H. J. Lu wrote: inc/dec has the same performance as add/sub on Core 2 Duo. But inc/dec is shorter. What about partial flag register dependency of inc/dec? There is no partial flag register dependency on inc/dec. My docs say that "INC/DEC does not change the carry flag". But

Re: x86 inc/dec on core2

2007-04-07 Thread H. J. Lu
On Sat, Apr 07, 2007 at 11:29:46AM +0200, Uros Bizjak wrote: > Hello! > > >> I was wondering, if: > >> > >> /* X86_TUNE_USE_INCDEC */ > >> ~(m_PENT4 | m_NOCONA | m_CORE2 | m_GENERIC), > >> > >> is correct. Should it be: > >> > >> /* X86_TUNE_USE_INCDEC */ > >> ~(m_PENT4 | m_NOCONA | m_

Re: x86 inc/dec on core2

2007-04-07 Thread Uros Bizjak
Hello! > I was wondering, if: > > /* X86_TUNE_USE_INCDEC */ > ~(m_PENT4 | m_NOCONA | m_CORE2 | m_GENERIC), > > is correct. Should it be: > > /* X86_TUNE_USE_INCDEC */ > ~(m_PENT4 | m_NOCONA | m_GENERIC), > > ? inc/dec has the same performance as add/sub on Core 2 Duo. But inc/de

Re: x86 inc/dec on core2

2007-04-06 Thread H. J. Lu
On Fri, Apr 06, 2007 at 01:27:09PM -0700, Mike Stump wrote: > I was wondering, if: > > /* X86_TUNE_USE_INCDEC */ > ~(m_PENT4 | m_NOCONA | m_CORE2 | m_GENERIC), > > is correct. Should it be: > > /* X86_TUNE_USE_INCDEC */ > ~(m_PENT4 | m_NOCONA | m_GENERIC), > > ? inc/dec has the same p