[Issue 9920] [Optimizer] Use mul/imul for integer division by constant

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 11 11:16:40 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9920



--- Comment #2 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2013-04-11 11:16:38 PDT ---
(In reply to comment #1)
> Dupe of 5607 ?

5607 is a special case of this enhancement. 
This one is generalization since any division by constant can be optimized.
Using small divisors only allows some more specialized varations of this
optimization (less accurate but enough for numbers in question).

> 
> (Even if it's a dupe you have good code in attach)

I'd say this one supersedes 5607, so how about merge your example here and
close 5607 ? (the 2 have to be merged anyway since the root cause is the same)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list