Hi, The reason could be that this code was written before the addition of BigInt to JavaScript, and at that time these reductions were not needed because 64-bit divisions were not used. I could imagine that when support for WebAssembly and BigInt was added, nobody remembered to add these reductions.
I would be happy to review your changes. Cheers, Andreas On Tue, Jun 28, 2022 at 2:26 PM Alvise de Faveri Tron <[email protected]> wrote: > Hi all! > > I was looking at MachineOperatorReducer in src/compiler and I've noticed > that, while there are reductions for signed and unsigned 32-bit integer > divisions (e.g. > MachineOperatorReducer::ReduceInt32Div), there is no such thing for > 64-bit divisions. > > Is there a reason why 64-bit divisions are not optimized? Maybe the *ctz > *operation > is too slow on 64 bits if there is no intrinsic *ctz* instruction? That's > just a wild (and likely incorrect) guess, I'd just be curious to know more. > > To give some context, I am part of the ongoing effort to port V8 to > RISCV32, and we noticed this possibility for optimization in this issue > <https://github.com/riscv-collab/v8/issues/574>. > > If there is no specific reason, I'd be happy to make this contribution. > > Best to all, > - Alvise > > -- > -- > v8-dev mailing list > [email protected] > http://groups.google.com/group/v8-dev > --- > You received this message because you are subscribed to the Google Groups > "v8-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/v8-dev/8f6d3e85-0141-416c-a82a-ed622b2ff30bn%40googlegroups.com > <https://groups.google.com/d/msgid/v8-dev/8f6d3e85-0141-416c-a82a-ed622b2ff30bn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/CAELSTvdy3afbD2o1n4hbZ5fUveXAmd_gXemvdQPwDfkK3Jb%3Dkw%40mail.gmail.com.
