Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Issue 13447003: IA32: Small assembler tweak for divsd->mulsd sequence (Closed)

Created:
7 years, 8 months ago by Zheng Liu
Modified:
7 years, 8 months ago
CC:
v8-dev
Visibility:
Public.

Description

IA32: Small assembler tweak for divsd->mulsd sequence Committed: https://code.google.com/p/v8/source/detail?r=14225

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -0 lines) Patch
M src/ia32/lithium-codegen-ia32.cc View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Zheng Liu
X64 already had it because I accidentally included it in a previous code review http://code.google.com/p/v8/source/detail?r=13289 ...
7 years, 8 months ago (2013-04-02 06:44:21 UTC) #1
Yang
On 2013/04/02 06:44:21, Zheng Liu wrote: > X64 already had it because I accidentally included ...
7 years, 8 months ago (2013-04-09 16:27:52 UTC) #2
Zheng Liu
On 2013/04/09 16:27:52, Yang wrote: > On 2013/04/02 06:44:21, Zheng Liu wrote: > > X64 ...
7 years, 8 months ago (2013-04-11 10:38:30 UTC) #3
Yang
On 2013/04/11 10:38:30, Zheng Liu wrote: > On 2013/04/09 16:27:52, Yang wrote: > > On ...
7 years, 8 months ago (2013-04-11 10:40:51 UTC) #4
Yang
Committed patchset #2 manually as r14225.
7 years, 8 months ago (2013-04-11 10:49:54 UTC) #5
Yang
On 2013/04/11 10:49:54, Yang wrote: > Committed patchset #2 manually as r14225. This patch seems ...
7 years, 8 months ago (2013-04-11 13:38:28 UTC) #6
Zheng Liu
7 years, 8 months ago (2013-04-12 11:36:28 UTC) #7
Message was sent while issue was closed.
On 2013/04/11 13:38:28, Yang wrote:
> On 2013/04/11 10:49:54, Yang wrote:
> > Committed patchset #2 manually as r14225.
> 
> This patch seems to have regressed this small benchmark:
> function benchmark() {
>   var fp = 1.5;
>   for (var i = 0; i < 10000; i++) {
>     fp = -(fp * 2.1) / 2.1;
>   }
> }
> 
> var elapsed = 0;
> var start = new Date();
> for (var n = 0; elapsed < 2000; n++) {
>   benchmark();
>   elapsed = new Date() - start;
> }
> 
> So apparently, when division follows after multiplication, this slows things
> down. Would it be possible to do this smarter somehow, so that the move is
only
> inserted when mulsd follows divsd?

Could you please tell me on the CPU and how much the regression is?
I tested on Nehalem and didn't notice the regression.

Being smarter looks a bit difficult.
I tried to do it in patch set 3, but it is hackish and inefficient.

Powered by Google App Engine
This is Rietveld 408576698