Michael Holman 9 năm trước cách đây
mục cha
commit
9077efc334

+ 0 - 97
lib/Backend/GlobOpt.cpp

@@ -5750,11 +5750,6 @@ GlobOpt::OptSrc(IR::Opnd *opnd, IR::Instr * *pInstr, Value **indirIndexValRef, I
         return val;
     }
 
-    case IR::OpndKindSimd128Const:
-        val = this->GetSimd128ConstantValue(opnd->AsSimd128ConstOpnd()->m_value, instr /*double check that we associate value with the right opnd/sym*/);
-        opnd->SetValueType(val->GetValueInfo()->Type());
-        return val;
-
     case IR::OpndKindAddr:
         {
             IR::AddrOpnd *addrOpnd = opnd->AsAddrOpnd();
@@ -6892,17 +6887,6 @@ GlobOpt::NewGenericValue(const ValueType valueType, Sym *const sym)
     return val;
 }
 
-Value *
-GlobOpt::GetSimd128ConstantValue(const SIMDValue value, IR::Instr * instr, IR::Opnd *const opnd) {
-
-    Assert((opnd ? opnd : instr->GetDst())->IsRegOpnd());
-    IRType simd128type = (opnd ? opnd : instr->GetDst())->AsRegOpnd()->GetType();
-    Simd128ConstantValueInfo* valueInfo = Simd128ConstantValueInfo::New(this->alloc, value, simd128type);
-    Value *val = NewValue(valueInfo);
-    this->InsertNewValue(val, opnd);
-    return val;
-}
-
 Value *
 GlobOpt::GetIntConstantValue(const int32 intConst, IR::Instr * instr, IR::Opnd *const opnd)
 {
@@ -7653,7 +7637,6 @@ GlobOpt::ValueNumberDst(IR::Instr **pInstr, Value *src1Val, Value *src2Val)
 
     case Js::OpCode::LdC_A_R8:
     case Js::OpCode::LdC_A_I4:
-    case Js::OpCode::Simd128_LdC:
     case Js::OpCode::ArgIn_A:
         dstVal = src1Val;
         break;
@@ -8899,11 +8882,6 @@ GlobOpt::TypeSpecialization(
     }
 #endif
 
-    if (OptConstFoldSimd128(&instr, *pSrc1Val, *pSrc2Val, pDstVal)) //no overflow checks
-    {
-        return instr;
-    }
-
     if(!instr->ShouldCheckForIntOverflow())
     {
         if(src1Val && src1Val->GetValueInfo()->IsFloatConstant())
@@ -15433,70 +15411,6 @@ GlobOpt::AreValueInfosCompatible(const ValueInfo *const v0, const ValueInfo *con
         (!likelyIntValueinfo->IsLikelyTaggedInt() || !Js::TaggedInt::IsOverflow(int32Value));
 }
 
-bool GlobOpt::OptConstFoldSimd128(IR::Instr ** pInstr, Value * src1Val, Value * src2Val, Value ** pDstVal)
-{
-    //TODO: later on we might want to add support for ops taking nonSIMD types such as extractLane/swizzle, select
-    IR::Instr* &instr = *pInstr;
-    SIMDValue result;
-    result.Zero();
-    bool successful = false;
-
-    if (!Js::IsSimd128Opcode(instr->m_opcode) || IsLoopPrePass()) 
-        return false;
-
-    if (instr->GetSrc2())
-    {
-        typedef SIMDValue(*Simd128BinaryOp) (const SIMDValue& aValue, const SIMDValue& bValue);
-        Simd128BinaryOp op = (Simd128BinaryOp)instr->m_func->GetScriptContext()->GetThreadContext()->GetSimdOperation(instr->m_opcode);
-        if (op && src1Val->GetValueInfo()->IsSimd128Const() && src2Val->GetValueInfo()->IsSimd128Const())
-        {
-            result = op(src1Val->GetValueInfo()->AsSimd128ConstantValueInfo()->GetSIMDValue(), src2Val->GetValueInfo()->AsSimd128ConstantValueInfo()->GetSIMDValue());
-            successful = true;
-        }
-    }
-    else //unary
-    {
-        typedef SIMDValue(*Simd128UnaryOp) (const SIMDValue& aValue);
-        Simd128UnaryOp op = (Simd128UnaryOp)instr->m_func->GetScriptContext()->GetThreadContext()->GetSimdOperation(instr->m_opcode);
-        if (op && src1Val->GetValueInfo()->IsSimd128Const())
-        {
-            result = op(src1Val->GetValueInfo()->AsSimd128ConstantValueInfo()->GetSIMDValue());
-            successful = true;
-        }
-    }
-
-    if (!successful)
-        return false;
-
-    Assert(this->GetIsAsmJSFunc());
-    this->CaptureByteCodeSymUses(instr);
-    if (instr->GetSrc2())
-    {
-        instr->FreeSrc2();
-    }
-    IR::Opnd* constOpnd = IR::Simd128ConstOpnd::New(result, instr->GetDst()->GetType(), func);
-    instr->ReplaceSrc1(constOpnd);
-    this->OptSrc(constOpnd, &instr);
-
-    IR::Opnd *dst = instr->GetDst();
-    Assert(dst->IsRegOpnd());
-
-    StackSym *dstSym = dst->AsRegOpnd()->m_sym;
-
-    *pDstVal = GetSimd128ConstantValue(result, instr, instr->GetDst());
-
-    if (dstSym->IsSingleDef())
-    {
-        dstSym->SetIsSimd128Const();
-    }
-
-    GOPT_TRACE_INSTR(instr, _u("Constant folding at %p: \n"), instr);
-
-    instr->m_opcode = Js::OpCode::Simd128_LdC;
-    this->ToSimd128Dst(instr->GetDst()->GetType(), instr, instr->GetDst()->AsRegOpnd(), this->currentBlock);
-    return true;
-}
-
 #if DBG
 void
 GlobOpt::VerifyArrayValueInfoForTracking(
@@ -20553,17 +20467,6 @@ ValueInfo::AsIntBounded() const
     return static_cast<const IntBoundedValueInfo *>(this);
 }
 
-bool ValueInfo::IsSimd128Const() const
-{
-    return structureKind == ValueStructureKind::Simd128Const;
-}
-
-Simd128ConstantValueInfo* ValueInfo::AsSimd128ConstantValueInfo()
-{
-    Assert(IsSimd128Const());
-    return static_cast<Simd128ConstantValueInfo *>(this);
-}
-
 bool
 ValueInfo::IsFloatConstant() const
 {

+ 1 - 56
lib/Backend/GlobOpt.h

@@ -13,8 +13,7 @@ enum class ValueStructureKind
     FloatConstant,
     VarConstant,
     JsType,
-    Array,
-    Simd128Const
+    Array
 };
 
 class IntConstantValueInfo;
@@ -22,7 +21,6 @@ class IntRangeValueInfo;
 class IntBoundedValueInfo;
 class FloatConstantValueInfo;
 class VarConstantValueInfo;
-class Simd128ConstantValueInfo;
 class JsTypeValueInfo;
 class EquivalentTypeSetValueInfo;
 class ArrayValueInfo;
@@ -202,8 +200,6 @@ public:
     const FloatConstantValueInfo *  AsFloatConstant() const;
     bool                            IsVarConstant() const;
     VarConstantValueInfo *          AsVarConstant();
-    bool                            IsSimd128Const() const;
-    Simd128ConstantValueInfo*       AsSimd128ConstantValueInfo();
     bool                            IsJsType() const;
     JsTypeValueInfo *               AsJsType();
     const JsTypeValueInfo *         AsJsType() const;
@@ -482,55 +478,6 @@ public:
     }
 };
 
-class Simd128ConstantValueInfo : public ValueInfo
-{
-public:
-    static Simd128ConstantValueInfo *New(JitArenaAllocator *const allocator, const SIMDValue value, IRType type)
-    {
-        return JitAnew(allocator, Simd128ConstantValueInfo, value, type);
-    }
-
-    Simd128ConstantValueInfo *Copy(JitArenaAllocator *const allocator) const
-    {
-        return JitAnew(allocator, Simd128ConstantValueInfo, *this);
-    }
-
-    SIMDValue GetSIMDValue() const
-    {
-        return value;
-    }
-
-protected:
-	Simd128ConstantValueInfo(const SIMDValue v, IRType type)
-		: ValueInfo(convertSimdOpndToValueType(type), ValueStructureKind::Simd128Const),
-		value(v)
-	{
-	}
-
-private:
-	const SIMDValue value;
-
-	static ValueType convertSimdOpndToValueType(IRType type)
-	{
-
-		ValueType vt = ValueType::UninitializedObject;
-		switch (type)
-		{
-#define OPND2VALUE(_NAME_, _TAG_) \
-                case TySimd128##_TAG_##: \
-                    vt =  ValueType::GetSimd128(ObjectType::Simd128##_NAME_##); \
-                    break;
-			SIMD_EXPAND_W_NAME(OPND2VALUE)
-		default:
-			Assert(UNREACHED);
-#undef OPND2VALUE
-		}
-
-		return vt;
-	}
-
-};
-
 struct ObjectTypePropertyEntry
 {
     JITObjTypeSpecFldInfo* fldInfo;
@@ -1443,7 +1390,6 @@ private:
     Value *                 NewFloatConstantValue(const FloatConstType floatValue, IR::Opnd *const opnd = nullptr);
     Value *                 GetVarConstantValue(IR::AddrOpnd *addrOpnd);
     Value *                 NewVarConstantValue(IR::AddrOpnd *addrOpnd, bool isString);
-    Value *                 GetSimd128ConstantValue(const SIMDValue value, IR::Instr * instr, IR::Opnd *const opnd = nullptr);
     Value *                 HoistConstantLoadAndPropagateValueBackward(Js::Var varConst, IR::Instr * origInstr, Value * value);
     Value *                 NewFixedFunctionValue(Js::JavascriptFunction *functionValue, IR::AddrOpnd *addrOpnd);
 
@@ -1481,7 +1427,6 @@ private:
     bool                    OptConstFoldUnary(IR::Instr * *pInstr, const int32 intConstantValue, const bool isUsingOriginalSrc1Value, Value **pDstVal);
     bool                    OptConstPeep(IR::Instr *instr, IR::Opnd *constSrc, Value **pDstVal, ValueInfo *vInfo);
     bool                    OptConstFoldBranch(IR::Instr *instr, Value *src1Val, Value*src2Val, Value **pDstVal);
-    bool                    OptConstFoldSimd128(IR::Instr **instr, Value *src1Val, Value*src2Val, Value **pDstVal);
     Js::Var                 GetConstantVar(IR::Opnd *opnd, Value *val);
     bool                    IsWorthSpecializingToInt32DueToSrc(IR::Opnd *const src, Value *const val);
     bool                    IsWorthSpecializingToInt32DueToDst(IR::Opnd *const dst);

+ 0 - 20
lib/Common/CommonDefines.h

@@ -771,23 +771,3 @@
     #endif
 #endif // __APPLE__
 #endif // THREAD_LOCAL
-
-
-#ifdef ENABLE_SIMDJS
-#define SIMD_EXPAND_W_NAME(MACRO) \
-    SIMD_EXPAND_W_NAME_NUM_ONLY(MACRO) \
-    MACRO(Bool32x4, B4) \
-    MACRO(Bool16x8, B8) \
-    MACRO(Bool8x16, B16)
-
-#define SIMD_EXPAND_W_NAME_NUM_ONLY(MACRO)\
-    MACRO(Float32x4, F4) \
-    MACRO(Int32x4, I4) \
-    MACRO(Int16x8, I8) \
-    MACRO(Int8x16, I16) \
-    MACRO(Uint32x4, U4) \
-    MACRO(Uint16x8, U8) \
-    MACRO(Uint8x16, U16)
-#endif
-
-

+ 1 - 11
lib/Runtime/Base/ThreadContext.cpp

@@ -227,7 +227,7 @@ ThreadContext::ThreadContext(AllocationPolicyManager * allocationPolicyManager,
     simdOpcodeToSignatureMap = AnewArrayZ(this->GetThreadAlloc(), SimdFuncSignature, Js::Simd128OpcodeCount());
     {
 #define MACRO_SIMD_WMS(op, LayoutAsmJs, OpCodeAttrAsmJs, OpCodeAttr, ...) \
-    AddSimdFuncToMaps(Js::OpCode::##op, __VA_ARGS__, nullptr);
+    AddSimdFuncToMaps(Js::OpCode::##op, __VA_ARGS__);
 
 #define MACRO_SIMD_EXTEND_WMS(op, LayoutAsmJs, OpCodeAttrAsmJs, OpCodeAttr, ...) MACRO_SIMD_WMS(op, LayoutAsmJs, OpCodeAttrAsmJs, OpCodeAttr, __VA_ARGS__)
 
@@ -670,9 +670,6 @@ void ThreadContext::AddSimdFuncToMaps(Js::OpCode op, ...)
         simdFuncSignature.args[iArg] = va_arg(arguments, ValueType);
     }
 
-    ThreadContext::SimdFuncSignature::SIMD_OP_POINTER pOp = va_arg(arguments, ThreadContext::SimdFuncSignature::SIMD_OP_POINTER);
-    simdFuncSignature.op = pOp;
-
     simdOpcodeToSignatureMap[Js::SIMDUtils::SimdOpcodeAsIndex(op)] = simdFuncSignature;
 
     va_end(arguments);
@@ -724,15 +721,8 @@ void ThreadContext::GetSimdFuncSignatureFromOpcode(Js::OpCode op, SimdFuncSignat
     Assert(simdOpcodeToSignatureMap != nullptr);
     funcSignature = simdOpcodeToSignatureMap[Js::SIMDUtils::SimdOpcodeAsIndex(op)];
 }
-
-ThreadContext::SimdFuncSignature::SIMD_OP_POINTER ThreadContext::GetSimdOperation(Js::OpCode op)
-{
-    return simdOpcodeToSignatureMap[Js::SIMDUtils::SimdOpcodeAsIndex(op)].op;
-}
 #endif
 
-
-
 class AutoRecyclerPtr : public AutoPtr<Recycler>
 {
 public:

+ 0 - 3
lib/Runtime/Base/ThreadContext.h

@@ -412,12 +412,10 @@ public:
 
     struct SimdFuncSignature
     {
-        typedef void* SIMD_OP_POINTER;
         bool valid;
         uint argCount;          // actual arguments count (excluding this)
         ValueType returnType;
         ValueType *args;        // argument types
-        SIMD_OP_POINTER op;
     };
 
     SimdFuncSignature *simdOpcodeToSignatureMap;
@@ -426,7 +424,6 @@ public:
     void AddSimdFuncInfo(Js::OpCode op, Js::FunctionInfo *funcInfo);
     Js::OpCode GetSimdOpcodeFromFuncInfo(Js::FunctionInfo * funcInfo);
     void GetSimdFuncSignatureFromOpcode(Js::OpCode op, SimdFuncSignature &funcSignature);
-    ThreadContext::SimdFuncSignature::SIMD_OP_POINTER GetSimdOperation(Js::OpCode op);
 
 #if _M_IX86 || _M_AMD64
     // auxiliary SIMD values in memory to help JIT'ed code. E.g. used for Int8x16 shuffle.

+ 7 - 7
lib/Runtime/ByteCode/OpCodesSimd.h

@@ -70,17 +70,17 @@ MACRO_SIMD_WMS              ( Simd128_Splat_I4                  , Int32x4_1Int1
 MACRO_SIMD_WMS              ( Simd128_FromFloat32x4_I4          , Int32x4_1Float32x4_1              , None           ,        OpCanCSE         ,       3,  &Js::SIMDInt32x4Lib::EntryInfo::FromFloat32x4     , T_I4, T_F4)
 MACRO_SIMD_WMS              ( Simd128_FromFloat32x4Bits_I4      , Int32x4_1Float32x4_1              , None           ,        OpCanCSE         ,       3,  &Js::SIMDInt32x4Lib::EntryInfo::FromFloat32x4Bits , T_I4, T_F4)
 MACRO_SIMD_WMS              ( Simd128_Neg_I4                    , Int32x4_2                         , None           ,        OpCanCSE         ,       3,  &Js::SIMDInt32x4Lib::EntryInfo::Neg,    T_I4, T_I4)
-MACRO_SIMD_WMS              ( Simd128_Add_I4                    , Int32x4_3                         , None           ,        OpCanCSE         ,       4,  &Js::SIMDInt32x4Lib::EntryInfo::Add,    T_I4, T_I4, T_I4, &Js::SIMDInt32x4Operation::OpAdd)
-MACRO_SIMD_WMS              ( Simd128_Sub_I4                    , Int32x4_3                         , None           ,        OpCanCSE         ,       4,  &Js::SIMDInt32x4Lib::EntryInfo::Sub,    T_I4, T_I4, T_I4, &Js::SIMDInt32x4Operation::OpSub)
-MACRO_SIMD_WMS              ( Simd128_Mul_I4                    , Int32x4_3                         , None           ,        OpCanCSE         ,       4,  &Js::SIMDInt32x4Lib::EntryInfo::Mul,    T_I4, T_I4, T_I4, &Js::SIMDInt32x4Operation::OpMul)
+MACRO_SIMD_WMS              ( Simd128_Add_I4                    , Int32x4_3                         , None           ,        OpCanCSE         ,       4,  &Js::SIMDInt32x4Lib::EntryInfo::Add,    T_I4, T_I4, T_I4)
+MACRO_SIMD_WMS              ( Simd128_Sub_I4                    , Int32x4_3                         , None           ,        OpCanCSE         ,       4,  &Js::SIMDInt32x4Lib::EntryInfo::Sub,    T_I4, T_I4, T_I4)
+MACRO_SIMD_WMS              ( Simd128_Mul_I4                    , Int32x4_3                         , None           ,        OpCanCSE         ,       4,  &Js::SIMDInt32x4Lib::EntryInfo::Mul,    T_I4, T_I4, T_I4)
 MACRO_SIMD_WMS              ( Simd128_Lt_I4                     , Bool32x4_1Int32x4_2               , None           ,        OpCanCSE         ,       0)
 MACRO_SIMD_WMS              ( Simd128_Gt_I4                     , Bool32x4_1Int32x4_2               , None           ,        OpCanCSE         ,       0)
 MACRO_SIMD_WMS              ( Simd128_Eq_I4                     , Bool32x4_1Int32x4_2               , None           ,        OpCanCSE         ,       0)
 MACRO_SIMD_WMS              ( Simd128_Select_I4                 , Int32x4_1Bool32x4_1Int32x4_2      , None           ,        OpCanCSE         ,       0)
-MACRO_SIMD_WMS              ( Simd128_And_I4                    , Int32x4_3                         , None           ,        OpCanCSE         ,       4,  &Js::SIMDInt32x4Lib::EntryInfo::And,    T_I4, T_I4, T_I4, &Js::SIMDInt32x4Operation::OpAnd)
-MACRO_SIMD_WMS              ( Simd128_Or_I4                     , Int32x4_3                         , None           ,        OpCanCSE         ,       4,  &Js::SIMDInt32x4Lib::EntryInfo::Or,     T_I4, T_I4, T_I4, &Js::SIMDInt32x4Operation::OpOr)
-MACRO_SIMD_WMS              ( Simd128_Xor_I4                    , Int32x4_3                         , None           ,        OpCanCSE         ,       4,  &Js::SIMDInt32x4Lib::EntryInfo::Xor,    T_I4, T_I4, T_I4, &Js::SIMDInt32x4Operation::OpXor)
-MACRO_SIMD_WMS              ( Simd128_Not_I4                    , Int32x4_2                         , None           ,        OpCanCSE         ,       3,  &Js::SIMDInt32x4Lib::EntryInfo::Not,    T_I4, T_I4, &Js::SIMDInt32x4Operation::OpNot)
+MACRO_SIMD_WMS              ( Simd128_And_I4                    , Int32x4_3                         , None           ,        OpCanCSE         ,       4,  &Js::SIMDInt32x4Lib::EntryInfo::And,    T_I4, T_I4, T_I4)
+MACRO_SIMD_WMS              ( Simd128_Or_I4                     , Int32x4_3                         , None           ,        OpCanCSE         ,       4,  &Js::SIMDInt32x4Lib::EntryInfo::Or,     T_I4, T_I4, T_I4)
+MACRO_SIMD_WMS              ( Simd128_Xor_I4                    , Int32x4_3                         , None           ,        OpCanCSE         ,       4,  &Js::SIMDInt32x4Lib::EntryInfo::Xor,    T_I4, T_I4, T_I4)
+MACRO_SIMD_WMS              ( Simd128_Not_I4                    , Int32x4_2                         , None           ,        OpCanCSE         ,       3,  &Js::SIMDInt32x4Lib::EntryInfo::Not,    T_I4, T_I4)
 MACRO_SIMD_WMS              ( Simd128_ShLtByScalar_I4           , Int32x4_2Int1                     , None           ,        OpCanCSE         ,       0)
 MACRO_SIMD_WMS              ( Simd128_ShRtByScalar_I4           , Int32x4_2Int1                     , None           ,        OpCanCSE         ,       0)
 MACRO_SIMD_WMS              ( Simd128_Swizzle_I4                , Int32x4_2Int4                     , None           ,        OpCanCSE         ,       7,   &Js::SIMDInt32x4Lib::EntryInfo::Swizzle,   T_I4, T_I4, T_INT, T_INT, T_INT, T_INT)

+ 0 - 5
lib/Runtime/Library/SimdLib.h

@@ -31,8 +31,3 @@
 #include "Library/SimdBool32x4Lib.h"
 #include "Library/SimdBool16x8Lib.h"
 #include "Library/SimdBool8x16Lib.h"
-
-// SIMD ops
-//
-
-#include "Language/SimdInt32x4Operation.h"

+ 0 - 8
test/SIMD.int32x4.asmjs/rlexe.xml

@@ -735,12 +735,4 @@
         <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
      </default>
    </test>
-  <test>
-     <default>
-        <files>testConstFold.js</files>
-        <baseline>testConstFold.baseline</baseline>
-        <tags>exclude_dynapogo,exclude_ship</tags>
-        <compile-flags> -testtrace:asmjs -simdjs -bgjit- -maic:0</compile-flags>
-     </default>
-   </test>
 </regress-exe>

+ 0 - 4
test/SIMD.int32x4.asmjs/testConstFold.baseline

@@ -1,4 +0,0 @@
-Successfully compiled asm.js code
-SIMD.Int32x4(13, 13, 13, 13)
-SIMD.Int32x4(13, 13, 13, 13)
-PASS

+ 0 - 116
test/SIMD.int32x4.asmjs/testConstFold.js

@@ -1,116 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// Copyright (C) Microsoft Corporation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
-//-------------------------------------------------------------------------------------------------------
-
-function asmModule(stdlib, imports) {
-    "use asm";
-    var i4 = stdlib.SIMD.Int32x4;
-    var i4check = i4.check;
-    var i4splat = i4.splat;
-    
-    var i4fromFloat32x4 = i4.fromFloat32x4;
-    var i4fromFloat32x4Bits = i4.fromFloat32x4Bits;
-    //var i4abs = i4.abs;
-    var i4neg = i4.neg;
-    var i4add = i4.add;
-    var i4sub = i4.sub;
-    var i4mul = i4.mul;
-    //var i4swizzle = i4.swizzle;
-    //var i4shuffle = i4.shuffle;
-    var i4lessThan = i4.lessThan;
-    var i4equal = i4.equal;
-    var i4greaterThan = i4.greaterThan;
-    var i4select = i4.select;
-    var i4and = i4.and;
-    var i4or = i4.or;
-    var i4xor = i4.xor;
-    var i4not = i4.not;
-    //var i4shiftLeftByScalar = i4.shiftLeftByScalar;
-    //var i4shiftRightByScalar = i4.shiftRightByScalar;
-    //var i4shiftRightArithmeticByScalar = i4.shiftRightArithmeticByScalar;
-
-    var f4 = stdlib.SIMD.Float32x4;  
-    var f4check = f4.check;
-    var f4splat = f4.splat;
-    
-    var f4fromInt32x4 = f4.fromInt32x4;
-    var f4fromInt32x4Bits = f4.fromInt32x4Bits;
-    var f4abs = f4.abs;
-    var f4neg = f4.neg;
-    var f4add = f4.add;
-    var f4sub = f4.sub;
-    var f4mul = f4.mul;
-    var f4div = f4.div;
-    
-    var f4min = f4.min;
-    var f4max = f4.max;
-
-
-    var f4sqrt = f4.sqrt;
-    //var f4swizzle = f4.swizzle;
-    //var f4shuffle = f4.shuffle;
-    var f4lessThan = f4.lessThan;
-    var f4lessThanOrEqual = f4.lessThanOrEqual;
-    var f4equal = f4.equal;
-    var f4notEqual = f4.notEqual;
-    var f4greaterThan = f4.greaterThan;
-    var f4greaterThanOrEqual = f4.greaterThanOrEqual;
-
-    var f4select = f4.select;
-
-
-    
-
-    var fround = stdlib.Math.fround;
-	var loopCOUNT = 10;
-
-	function func2() {
-		
-		
-		var a = i4(1,1,1,1);
-		var b = i4(2,2,2,2);
-		var c = i4(3,3,3,3);
-		var d = i4(1,1,1,1);
-		var loopIndex = 0;
-		
-		for (loopIndex = 0; (loopIndex | 0) < (loopCOUNT | 0) ; loopIndex = (loopIndex + 1) | 0) {
-
-			d = i4add(b,c);
-			d = i4mul(d,c);
-			d = i4sub(d,b);
-
-        }
-		
-
-        return i4check(d);
-    }
-
-    
-
-
-    function func1()
-    {
-        var i = 0;
-		var a = i4(1,1,1,1);
-		var b = i4(2,2,2,2);
-		var c = i4(3,3,3,3);
-		
-		a = i4add(b,c);
-		a = i4mul(a,c);
-		a = i4sub(a,b);
-
-        return i4check(a);
-    }
-    
-    
-    
-    return {func1:func1, func2:func2};
-}
-
-var m = asmModule(this, {});
-
-print(m.func1());
-print(m.func2());
-
-print("PASS");