Bug 1225908 - AsmSimdTypeToLaneType. r=bbouvier
authorJakob Stoklund Olesen <jolesen@mozilla.com>
Thu, 19 Nov 2015 10:37:19 -0800
changeset 273398 d63e7bf319f4c544272479cddd9c7092361040b0
parent 273397 1e9a544bc43ebc07fdacf5736ae8936a4ba3bf95
child 273399 6ab2285938201fecc0c06d083e71dc0ec17229e0
push id29702
push usercbook@mozilla.com
push dateFri, 20 Nov 2015 12:13:22 +0000
treeherdermozilla-central@ec628289d8b4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1225908
milestone45.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 1225908 - AsmSimdTypeToLaneType. r=bbouvier Rename AsmSimdTypeToScalarType to AsmSimdTypeToLaneType, hoping that the new name will be clearer.
js/src/asmjs/AsmJSCompile.cpp
--- a/js/src/asmjs/AsmJSCompile.cpp
+++ b/js/src/asmjs/AsmJSCompile.cpp
@@ -1913,17 +1913,17 @@ EmitExtractLane(FunctionCompiler& f, Asm
     MOZ_ASSERT(laneLit < 4);
     SimdLane lane = SimdLane(laneLit);
 
     *def = f.extractSimdElement(lane, vec, ScalarMIRTypeFromSimdAsmType(type));
     return true;
 }
 
 static AsmType
-AsmSimdTypeToScalarType(AsmType simd)
+AsmSimdTypeToLaneType(AsmType simd)
 {
     switch (simd) {
       case AsmType::Int32x4:   return AsmType::Int32;
       case AsmType::Float32x4: return AsmType::Float32;
       case AsmType::Int32:
       case AsmType::Float32:
       case AsmType::Float64:    break;
     }
@@ -1947,17 +1947,17 @@ EmitSimdReplaceLane(FunctionCompiler& f,
         int32_t laneLit = laneDef->toConstant()->value().toInt32();
         MOZ_ASSERT(laneLit < 4);
         lane = SimdLane(laneLit);
     } else {
         lane = SimdLane(-1);
     }
 
     MDefinition* scalar;
-    if (!EmitExpr(f, AsmSimdTypeToScalarType(simdType), &scalar))
+    if (!EmitExpr(f, AsmSimdTypeToLaneType(simdType), &scalar))
         return false;
     *def = f.insertElementSimd(vector, scalar, lane, MIRTypeFromAsmType(simdType));
     return true;
 }
 
 template<class T>
 inline bool
 EmitSimdCast(FunctionCompiler& f, AsmType fromType, AsmType toType, MDefinition** def)
@@ -2050,17 +2050,17 @@ EmitSimdSelect(FunctionCompiler& f, AsmT
     *def = f.selectSimd(defs[0], defs[1], defs[2], MIRTypeFromAsmType(type), isElementWise);
     return true;
 }
 
 static bool
 EmitSimdSplat(FunctionCompiler& f, AsmType type, MDefinition** def)
 {
     MDefinition* in;
-    if (!EmitExpr(f, AsmSimdTypeToScalarType(type), &in))
+    if (!EmitExpr(f, AsmSimdTypeToLaneType(type), &in))
         return false;
     *def = f.splatSimd(in, MIRTypeFromAsmType(type));
     return true;
 }
 
 static bool
 EmitSimdCtor(FunctionCompiler& f, AsmType type, MDefinition** def)
 {