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(); |