Add rotate to Wasm
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Nov 2016 19:21:42 +0000 (19:21 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Nov 2016 19:21:42 +0000 (19:21 +0000)
commit8dd7b1fd0d1443647970ef5e43219e93cf6fb240
tree633fe3fbd646471c133c2126e8142c2b789ef5e9
parent8dac97f2ecdb0afc03cbf2e841f7ce2e00f006f9
Add rotate to Wasm
https://bugs.webkit.org/show_bug.cgi?id=164871

Reviewed by Filip Pizlo.

JSTests:

* wasm/wasm.json:

Source/JavaScriptCore:

Add rotate left and rotate right to Wasm. These directly map to B3 opcodes.
This also moves arm specific transformations of rotate left to lower macros
after optimization. It's a bad idea to have platform specific canonicalizations
in reduce strength since other optimizations may not be aware of it.

Add a bug to do pure CSE after lower macros after optimization since we want to
clean up RotL(value, Neg(Neg(shift))).

* b3/B3Generate.cpp:
(JSC::B3::generateToAir):
* b3/B3LowerMacrosAfterOptimizations.cpp:
* b3/B3ReduceStrength.cpp:
* wasm/wasm.json:

Websites/webkit.org:

Update docs for new rotate instructions.

* docs/b3/intermediate-representation.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/wasm/wasm.json
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/b3/B3Generate.cpp
Source/JavaScriptCore/b3/B3LowerMacrosAfterOptimizations.cpp
Source/JavaScriptCore/b3/B3ReduceStrength.cpp
Source/JavaScriptCore/wasm/wasm.json
Websites/webkit.org/ChangeLog
Websites/webkit.org/docs/b3/intermediate-representation.html