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

Issue 1818323002: [turbofan] Fix operands for VisitDiv on Intel. (Closed)

Created:
4 years, 9 months ago by Mircea Trofin
Modified:
4 years, 7 months ago
Reviewers:
titzer, bradnelson, bradn
CC:
v8-reviews_googlegroups.com, v8-x87-ports_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] Fix operands for VisitDiv on Intel. The idiv instruction has 2 registers as output. This needs to be modeled so that the move optimizer won't incorrectly elide away moves. BUG= Committed: https://crrev.com/1da4b88e8200172eab71bc71253a8adf0e08b466 Cr-Commit-Position: refs/heads/master@{#34978}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -4 lines) Patch
M src/compiler/ia32/instruction-selector-ia32.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/x64/instruction-selector-x64.cc View 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 16 (6 generated)
bradn
lgtm, seems to fix the problem.
4 years, 9 months ago (2016-03-22 06:21:37 UTC) #4
bradn
titzer, please review for src/compiler owners
4 years, 9 months ago (2016-03-22 06:22:09 UTC) #5
titzer
lgtm
4 years, 9 months ago (2016-03-22 07:50:54 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1818323002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1818323002/1
4 years, 9 months ago (2016-03-22 08:01:51 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 9 months ago (2016-03-22 08:03:44 UTC) #10
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/1da4b88e8200172eab71bc71253a8adf0e08b466 Cr-Commit-Position: refs/heads/master@{#34978}
4 years, 9 months ago (2016-03-22 08:04:57 UTC) #12
Jakob Kummerow
DBC: This CL touches VisitMod, not VisitDiv. Why does it not include a regression test?
4 years, 7 months ago (2016-04-27 12:08:54 UTC) #13
Mircea Trofin
On 2016/04/27 12:08:54, Jakob wrote: > DBC: This CL touches VisitMod, not VisitDiv. > > ...
4 years, 7 months ago (2016-04-28 20:29:07 UTC) #14
titzer
On 2016/04/28 20:29:07, Mircea Trofin wrote: > On 2016/04/27 12:08:54, Jakob wrote: > > DBC: ...
4 years, 7 months ago (2016-04-29 07:48:46 UTC) #15
Mircea Trofin
4 years, 7 months ago (2016-04-29 15:15:07 UTC) #16
Message was sent while issue was closed.
On 2016/04/29 07:48:46, titzer wrote:
> On 2016/04/28 20:29:07, Mircea Trofin wrote:
> > On 2016/04/27 12:08:54, Jakob wrote:
> > > DBC: This CL touches VisitMod, not VisitDiv. 
> > > 
> > > Why does it not include a regression test?
> > 
> > I'm thinking about what a meaningful regression test may be. I don't think
> it's
> > a very clear cut answer. The way I see it, the change fixed a specification
> bug:
> > the way we modeled a specific instruction (idiv) did not match its
> specification
> > - we omitted operands. It so happened we lived fine with it all this time,
> until
> > my move optimization work uncovered it.
> > 
> > To hit this issue the way it was hit "out there", we need a test that
assumes
> > the register allocator behaves a certain way. I'd be weary about such a
test.
> > 
> > To have had avoided this bug being introduced in the first place, we'd need
a
> > specification checker.
> > 
> > My preference would be to rely on more fuzz testing pre-release, combined
with
> > testing top "X" sites.
> 
> You're right that it's tough to nail these register allocator bugs. In the
past
> what I've done is to try to write a cctest that tries many different
> permutations of surrounding code (e.g. adjusting the number and location of
> parameters) to try to get a wide net to hit the bug. When I get such a test
that
> successfully hits it, then we keep it. That doesn't guarantee the exact bug
> won't reappear in the future, but gives a little boost to test coverage in the
> area--worthwhile enough, IMO. That of course doesn't preclude any of the other
> suggestions you made.

Thanks - this got me thinking - I think we can completely decouple this from
regalloc. We just need the optimizer to run on a hand-allocated chunk of Intel
code sequence. I'll put something together.

Powered by Google App Engine
This is Rietveld 408576698