Bug 1635958 - Warp: Transpile LoadBooleanResult. r=jandem
authorTom Schuster <evilpies@gmail.com>
Fri, 08 May 2020 07:58:30 +0000
changeset 528801 bd9919221ebd1e42b1d3f7a8f97da1cad00429e2
parent 528800 bfb077281e6e2a5ae1772100cf4004e9754be503
child 528802 97e4cf6414760ae2db49b7ab00f181b6ef6a4ee0
push id37396
push userncsoregi@mozilla.com
push dateFri, 08 May 2020 15:58:04 +0000
treeherdermozilla-central@ac7a5cda729f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1635958
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 1635958 - Warp: Transpile LoadBooleanResult. r=jandem Depends on D74344 Differential Revision: https://phabricator.services.mozilla.com/D74345
js/src/jit/CacheIROps.yaml
js/src/jit/WarpCacheIRTranspiler.cpp
--- a/js/src/jit/CacheIROps.yaml
+++ b/js/src/jit/CacheIROps.yaml
@@ -1045,17 +1045,17 @@
 
 - name: LoadUndefinedResult
   shared: true
   transpile: false
   args:
 
 - name: LoadBooleanResult
   shared: true
-  transpile: false
+  transpile: true
   args:
     val: BoolImm
 
 - name: LoadStringResult
   shared: false
   transpile: false
   args:
     str: StringField
--- a/js/src/jit/WarpCacheIRTranspiler.cpp
+++ b/js/src/jit/WarpCacheIRTranspiler.cpp
@@ -343,16 +343,23 @@ bool WarpCacheIRTranspiler::emitLoadInt3
 
 bool WarpCacheIRTranspiler::emitLoadObjectResult(ObjOperandId objId) {
   MDefinition* obj = getOperand(objId);
   MOZ_ASSERT(obj->type() == MIRType::Object);
   pushResult(obj);
   return true;
 }
 
+bool WarpCacheIRTranspiler::emitLoadBooleanResult(bool val) {
+  auto* constant = MConstant::New(alloc(), BooleanValue(val));
+  add(constant);
+  pushResult(constant);
+  return true;
+}
+
 bool WarpCacheIRTranspiler::emitLoadEnclosingEnvironment(
     ObjOperandId objId, ObjOperandId resultId) {
   MDefinition* env = getOperand(objId);
   auto* ins = MEnclosingEnvironment::New(alloc(), env);
   add(ins);
 
   return defineOperand(resultId, ins);
 }