Bug 1639534 part 3 - Transpile Math.floor in Warp. r=evilpie
authorJan de Mooij <jdemooij@mozilla.com>
Wed, 20 May 2020 18:45:17 +0000
changeset 531396 74a5be0601a28c2e6dc3b65ed7c9253197baa60d
parent 531395 0ee345bdc942d1f53bf08c17262fd357568aab62
child 531397 3362d9133ec346616292a5f86e020a79cf163126
push id37439
push userbtara@mozilla.com
push dateThu, 21 May 2020 21:49:34 +0000
treeherdermozilla-central@92c11f0bf14b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersevilpie
bugs1639534
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1639534 part 3 - Transpile Math.floor in Warp. r=evilpie Depends on D76149 Differential Revision: https://phabricator.services.mozilla.com/D76150
js/src/jit/CacheIROps.yaml
js/src/jit/WarpCacheIRTranspiler.cpp
--- a/js/src/jit/CacheIROps.yaml
+++ b/js/src/jit/CacheIROps.yaml
@@ -671,17 +671,17 @@
 - name: MathSqrtNumberResult
   shared: true
   transpile: true
   args:
     input: NumberId
 
 - name: MathFloorToInt32Result
   shared: true
-  transpile: false
+  transpile: true
   args:
     input: NumberId
 
 - name: MathRoundToInt32Result
   shared: true
   transpile: true
   args:
     input: NumberId
--- a/js/src/jit/WarpCacheIRTranspiler.cpp
+++ b/js/src/jit/WarpCacheIRTranspiler.cpp
@@ -973,16 +973,27 @@ bool WarpCacheIRTranspiler::emitMathAbsN
 
   auto* ins = MAbs::New(alloc(), input, MIRType::Double);
   add(ins);
 
   pushResult(ins);
   return true;
 }
 
+bool WarpCacheIRTranspiler::emitMathFloorToInt32Result(
+    NumberOperandId inputId) {
+  MDefinition* input = getOperand(inputId);
+
+  auto* ins = MFloor::New(alloc(), input);
+  add(ins);
+
+  pushResult(ins);
+  return true;
+}
+
 bool WarpCacheIRTranspiler::emitMathRoundToInt32Result(
     NumberOperandId inputId) {
   MDefinition* input = getOperand(inputId);
 
   auto* ins = MRound::New(alloc(), input);
   add(ins);
 
   pushResult(ins);