Index: test/mjsunit/simd/osr.js |
diff --git a/test/mjsunit/function-named-self-reference.js b/test/mjsunit/simd/osr.js |
similarity index 84% |
copy from test/mjsunit/function-named-self-reference.js |
copy to test/mjsunit/simd/osr.js |
index 5b03b094b7a4ef89a3730980fa863936056be0c5..024a6c8eb27c5e009121c74f2095f6de1079da1b 100644 |
--- a/test/mjsunit/function-named-self-reference.js |
+++ b/test/mjsunit/simd/osr.js |
@@ -25,21 +25,19 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Flags: --allow-natives-syntax |
+// Flags: --simd_object |
-var fn = function fn(val) { |
- if (val) return val; |
- |
- %OptimizeFunctionOnNextCall(fn); |
- |
- function run(val) { |
- var res = fn((val + 1) << 1); |
- |
- return res; |
+function testSIMDAbs() { |
+ var a4 = float32x4(1.0, -2.0, 3.0, -4.0); |
+ var b4; |
+ for (var i = 0; i < 100000; i++) { |
+ b4 = SIMD.float32x4.abs(a4); |
} |
- return run(0); |
+ assertEquals(1.0, b4.x); |
+ assertEquals(2.0, b4.y); |
+ assertEquals(3.0, b4.z); |
+ assertEquals(4.0, b4.w); |
} |
-var res = fn(); |
-assertEquals(res, 2); |
+testSIMDAbs(); |