bmeurer@chromium.org
498920f91c
[turbofan] Also optimize unsigned division by constant.
...
TEST=cctest,mjsunit,unittests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/697663003
Cr-Commit-Position: refs/heads/master@{#25061}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-03 10:05:46 +00:00
titzer@chromium.org
bd5c9834b6
Fix bug in optimization of Uint32LessThan.
...
R=jarin@chromium.org
BUG=
Review URL: https://codereview.chromium.org/689883003
Cr-Commit-Position: refs/heads/master@{#25023}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-30 15:52:47 +00:00
sigurds@chromium.org
75ac43928b
Add floor, ceil, round (truncate) instructions for ia32, x64 (if SSE4.1) and
...
add floor, ceil, round (truncate and away from zero) for arm64.
R=bmeurer@chromium.org , dcarney@chromium.org , mstarzinger@chromium.org , rodolph.perfetta@arm.com
TEST=test/mjsunit/asm/math-floor.js,test/mjsunit/asm/math-ceil.js,test/unittest/compiler/js-builtin-reducer-unittest.cc
Review URL: https://codereview.chromium.org/677433002
Cr-Commit-Position: refs/heads/master@{#25018}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-30 14:16:15 +00:00
bmeurer@chromium.org
de088f207c
[turbofan] Introduce new Select operator to improve bounds checking.
...
TEST=mjsunit,unittests
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/691513002
Cr-Commit-Position: refs/heads/master@{#24980}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-29 14:17:14 +00:00
bmeurer@chromium.org
95095af57f
[turbofan] Improve typed lowering for JSToBoolean.
...
- JSToBoolean(x:string) => BooleanNot(NumberEqual(x.length, #0 ))
- JSToBoolean(phi(x1,...,xn):primitive) => phi(JSToBoolean(x1),...,JSToBoolean(xn))
TEST=cctest,mjsunit/asm/do-while,mjsunit/boolean,unittests
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/681223002
Cr-Commit-Position: refs/heads/master@{#24919}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-28 08:34:15 +00:00
bmeurer@chromium.org
d029d76120
[turbofan] Skip bounds checks for positive indices only.
...
TEST=unittests,mjsunit/asm/int32array-constant-key
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/647773004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-20 06:25:41 +00:00
titzer@chromium.org
e4c6f9488e
Implement graph trimming in ControlReducer.
...
Trimming the graph consists of breaking links from nodes that are not reachable from end to nodes that are reachable from end. Such dead nodes show up in the use lists of the live nodes and though mostly harmless, just clutter up the graph. They also can limit instruction selection opportunities, so it is good to get rid of them.
This CL is one half of the ControlReducer functionality, the other half
being branch folding.
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/661923002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 11:51:57 +00:00
bmeurer@chromium.org
a779150260
[turbofan] Eliminate typed array bounds checks if both key and length are constant.
...
TEST=mjsunit,unittests
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/638853004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 09:35:45 +00:00
bmeurer@chromium.org
fe6656fbfe
[arm] Prefer BIC over BFC.
...
BFC requires same register for input and output and causes introduction
of some unneccesary gap moves.
TEST=unittests,mjsunit
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/658283003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 07:07:54 +00:00
bmeurer@chromium.org
81877a6440
[turbofan] Optimize division/modulus by constant.
...
TEST=cctest,mjsunit,unittests
R=dcarney@chromium.org , svenpanne@chromium.org
Review URL: https://codereview.chromium.org/654833002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-14 11:57:06 +00:00
bmeurer@chromium.org
5c1f7b5aa1
[turbofan] Optimize Int32Mod by power-of-two.
...
TEST=mjsunit/asm/int32-tmod,unittests
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/649083005
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24554 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-13 11:09:32 +00:00
bmeurer@chromium.org
9b306893a3
[turbofan] Properly emit bounds checks for typed array element loads.
...
Also fix an awfull bug in simplified lowering.
TEST=cctest,mjsunit/asm
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/640603003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24463 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-08 11:16:45 +00:00
titzer@chromium.org
015f963e8f
Lower NumberMultiply, NumberDivide, and NumberModulus to Int32Mul, Int32[U]Div, and Int32[U]Mod when possible in simplified-lowering.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/620553008
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-08 10:53:46 +00:00
mstarzinger@chromium.org
28e733e7d0
Extend JSBuiltinReducer to cover Math.abs as well.
...
R=titzer@chromium.org
TEST=compiler-unittests/JSBuiltinReducerTest.MathAbs
Review URL: https://codereview.chromium.org/605123004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-26 14:06:56 +00:00
bmeurer@chromium.org
7099d635ee
[turbofan] Reduce shl with sar/shr and same shift amount to bit-and.
...
The shl(sar(x, K), K) is a common pattern with typed loads/stores in
asm.js.
TEST=compiler-unittests,mjsunit/asm/int32array-unaligned
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/598083007
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24238 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-26 07:35:59 +00:00
mstarzinger@chromium.org
47ec735026
Slightly adapt Math.fround test.
...
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/606583002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-25 08:44:15 +00:00
mstarzinger@chromium.org
ea97f413ee
Extend JSBuiltinReducer to cover Math.fround as well.
...
R=bmeurer@chromium.org
TEST=compiler-unittests/JSBuiltinReducerTest.MathFround
Review URL: https://codereview.chromium.org/594183004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-24 14:55:13 +00:00