Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1251)

Unified Diff: test/mjsunit/compiler/osr-sar.js

Issue 21340002: Generate a custom OSR entrypoint for OSR compiles on all platforms, and transition to optimized cod… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remerge with recent changes. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/mjsunit/compiler/osr-sar.js
diff --git a/test/mjsunit/regress/regress-crbug-145961.js b/test/mjsunit/compiler/osr-sar.js
similarity index 83%
copy from test/mjsunit/regress/regress-crbug-145961.js
copy to test/mjsunit/compiler/osr-sar.js
index eb88945e0f9cd814b26787e31ccf5e065acbbf58..fd68b98a45be2eb5652c4d5873432fedbe0b0710 100644
--- a/test/mjsunit/regress/regress-crbug-145961.js
+++ b/test/mjsunit/compiler/osr-sar.js
@@ -25,15 +25,25 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// This test causes the operands to be passed in as Integer32 registers.
// Flags: --allow-natives-syntax
+
function test() {
- var a = new Int32Array(2);
- var x = a[0];
- return Math.min(x, x);
+ // Loop to force OSR.
+ var j = 0;
+ for (var i = 0; i < 80000; i++) {
+ j++;
+ }
+
+ function SarShr(val) {
+ return val >> (-2 >>> 0);
+ }
+
+ var K3 = 0x80000000;
+ assertEquals(-2, SarShr(K3 | 0));
+ assertEquals(-2, SarShr(K3 | 0));
+ %OptimizeFunctionOnNextCall(SarShr);
+ assertEquals(-2, SarShr(K3 | 0));
}
-assertEquals(0, test());
-assertEquals(0, test());
-%OptimizeFunctionOnNextCall(test);
-assertEquals(0, test());
+test();
+//test();

Powered by Google App Engine
This is Rietveld 408576698