-
Benedikt Meurer authored
The CheckedInt32Mod lowering in the EffectControlLinearizer wasn't playing well with subsequent optimizations in the MachineOperatorReducer especially due to the use of Int32Mod, which introduces another (floating) diamond in the MachineOperatorReducer. Switching to Uint32Mod and explicit sign handling fixes the problem, plus we also do the mask trick in the case where the left hand side is negative now. With this change the performance on the benchmark mentioned in the bug report goes from console.timeEnd: binary, 1872.346000 console.timeEnd: modulo, 5967.464000 console.timeEnd: binary, 6006.789000 console.timeEnd: modulo, 6293.496000 console.timeEnd: binary, 5969.264000 console.timeEnd: modulo, 6291.874000 to console.timeEnd: binary, 1876.464000 console.timeEnd: modulo, 5846.643000 console.timeEnd: binary, 5962.545000 console.timeEnd: modulo, 5972.639000 console.timeEnd: binary, 5958.221000 console.timeEnd: modulo, 5973.171000 so even the peak performance of the modulus is now mostly the same as the binary bitwise and. Bug: v8:8069 Change-Id: Iaf3828fc0f6c53352367e8bf6c42534f8b13bfb3 Reviewed-on: https://chromium-review.googlesource.com/1180971Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#55211}
35974e2d