B3 should reduce Trunc(BitOr(value, constant)) where !(constant & 0xffffffff) to...
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jan 2016 03:25:57 +0000 (03:25 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jan 2016 03:25:57 +0000 (03:25 +0000)
commitcbe2cd071c8478c7c1b302360e99f7653105d285
tree2f92a1b67fba3f0fa96bb84810d1be2347b25b0c
parent75629fbb3f57c22fb54454e9191387081eb28458
B3 should reduce Trunc(BitOr(value, constant)) where !(constant & 0xffffffff) to Trunc(value)
https://bugs.webkit.org/show_bug.cgi?id=152955

Reviewed by Saam Barati.

This happens when we box an int32 and then immediately unbox it.

This makes an enormous difference on AsmBench/FloatMM. It's a 2x speed-up on that
benchmark. It's neutral elsewhere.

* b3/B3ReduceStrength.cpp:
* b3/testb3.cpp:
(JSC::B3::testPowDoubleByIntegerLoop):
(JSC::B3::testTruncOrHigh):
(JSC::B3::testTruncOrLow):
(JSC::B3::testBitAndOrHigh):
(JSC::B3::testBitAndOrLow):
(JSC::B3::zero):
(JSC::B3::run):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/b3/B3ReduceStrength.cpp
Source/JavaScriptCore/b3/testb3.cpp