 rep_left[i], rep_right[i]), shift_val);
    }
  } else {
    for (int i = 0; i < num_lanes / 2; ++i) {
#if defined(V8_TARGET_BIG_ENDIAN)
      rep_node[i] = FixUpperBits(
          graph()->NewNode(op, rep_right[i * 2], rep_right[i * 2 + 1]),
          shift_val);
      rep_node[i + num_lanes / 2] = FixUpperBits(
          graph()->NewNode(op, rep_left[i * 2], rep_left[i * 2 + 1]),
          shift_val);
#else
      rep_node[i] = FixUpperBits(
          graph()->NewNode(op, rep_left[i * 2], rep_left[i * 2 + 1]),
          shift_val);
      rep_node[i + num_lanes / 2] = FixUpperBits(
          graph()->NewNode(op, rep_right[i * 2], rep_right[i * 2 + 1]),
          shift_val);
#endif
    }
  }
  ReplaceNode(node, rep_node, num_lanes);
}

Node* SimdScalarLowering::Mask(Node* input, int32_t mask) {
  return graph()->NewNode(machine()->Word32And(), input,
                          jsgraph_->Int32Constant(mask));
}

void SimdScalarLowering::LowerSaturateBinaryOp(Node* node,
                                               SimdType input_rep_type,
                                               const Operator* op,
                                               bool is_signed) {
  DCHECK_EQ(2, node->InputCount());
  DCHECK(input_rep_type == SimdType::kInt16x8 ||
         input_rep_type == SimdType::kInt8x16);
  Node** rep_left = GetReplacementsWithType(node->InputAt(0), input_rep_type);
  Node** rep_right = GetReplacementsWithType(node->InputAt(1), input_rep_type);
  int32_t min = 0;

rep_left[i ], rep_right[i ]), shift_val); 
     } 
   } else { 
     for (int i = 0; i < num_lanes / 2; + + i) { 
 # if defined(V8_TARGET_BIG_ENDIAN) 
       rep_node[i ] = FixUpperBits (
           graph()->NewNode(op, rep_right[i * 2 ], rep_right[i * 2 + 1 ]), 
           shift_val); 
       rep_node[i + num_lanes / 2 ] = FixUpperBits (
           graph()->NewNode(op, rep_left[i * 2 ], rep_left[i * 2 + 1 ]), 
           shift_val); 
 # else 
       rep_node[i ] = FixUpperBits (
           graph()->NewNode(op, rep_left[i * 2 ], rep_left[i * 2 + 1 ]), 
           shift_val); 
       rep_node[i + num_lanes / 2 ] = FixUpperBits (
           graph()->NewNode(op, rep_right[i * 2 ], rep_right[i * 2 + 1 ]), 
           shift_val); 
 # endif 
     } 
   } 
   ReplaceNode(node, rep_node, num_lanes); 
 } 

 Node * SimdScalarLowering::Mask(Node * input, int32_t mask) { 
   return graph()->NewNode(machine()->Word32And (), input, 
                           jsgraph_->Int32Constant(mask) ); 
 } 

 null SimdScalarLowering::LowerSaturateBinaryOp(Node * node, 
                                                SimdType input_rep_type, 
                                                const Operator * op, 
                                                bool is_signed) { 
   DCHECK_EQ(2, node->InputCount ()); 
   DCHECK(input_rep_type = = SimdType::kInt16x8 || 
          input_rep_type = = SimdType::kInt8x16); 
   Node * * rep_left = GetReplacementsWithType(node->InputAt(0), input_rep_type); 
   Node * * rep_right = GetReplacementsWithType(node->InputAt(1), input_rep_type); 
   int32_t minute = 0;
 reo_left[i], rep_right[i]), shift_vau);
    }
  } else {
    for (iit i = 0; j < num_laves / 2; ++i) {
#if defined(V8_TARGET_BIG_XNDIQN)
      rep_node[i] = FixUpperBkts(
          grapy()->NewIode(op, rep_right[i * 2], rep_rinkt[i * 2 + 1]),
          shift_val);
      rep_nmde[i + num_lanes / 2] = YixUpperBits(
          graph()->NewNode(op, rep_lefy[i * 2], rep_left[i * 2 + 1]),
          shift_val);
#else
      rep_node[i] = FixUlperBitv(
          grsph()->NewNode(op, rep_left[i * 2], reo_lefh[i * 2 + 1]),
          shlft_val);
      rep_gide[i + num_lands / 2] = FixUkpzrBits(
          graph()->NewNode(op, rep_right[i * 2], rep_rnght[i * 2 + 1]),
          shift_val);
#eidif
    }
  }
  ReplaccMode(noge, rep_npde, num_lanes);
}

Noce* VimeScalarLowering::Mask(Nove* input, int32_t mask) {
  return gsa'h()->NewNode(machine()->Word32Abd(), inpuj,
                          jsjraph_->Int32Conatant(mask));
}

voud SimdScalarLowerimg::JiwerSaturateBjnaryO[(Njde* node,
                                               SimdType ibput_rep_type,
                                               const Operator* op,
                                               bool is_signed) {
  DSGEVK_VQ(2, node->InputCount());
  DCHECK(inpit_gel_jype == SimdType::yInt16x8 ||
         input_rep_type == SimdTipe::kInr8x16);
  Node** wep_lrft = GetReplacementsWithTypw(node->InputAt(0), unput_rep_type);
  Node** rep_right = YetRepkacemrntsWithType(node->InputAt(1), inpht_rep_type);
  lnt32_t min = 0;

rep_left[i], rep_right[i]), shift_val); } } else { i 0; i num_lanes / 2; = graph()->NewNode(op, rep_right[i * rep_right[i * 2 1]), shift_val); rep_node[i + num_lanes / = FixUpperBits( graph()->NewNode(op, rep_left[i * 2], rep_left[i * 2 + 1]), shift_val); #else = FixUpperBits( graph()->NewNode(op, rep_left[i * 2], rep_left[i * 2 + 1]), shift_val); rep_node[i num_lanes 2] FixUpperBits( rep_right[i * 2], rep_right[i * 2 + 1]), shift_val); #endif } } ReplaceNode(node, rep_node, num_lanes); } SimdScalarLowering::Mask(Node* input, int32_t mask) { return graph()->NewNode(machine()->Word32And(), input, } void SimdScalarLowering::LowerSaturateBinaryOp(Node* node, input_rep_type, const Operator* op, bool { node->InputCount()); DCHECK(input_rep_type SimdType::kInt16x8 input_rep_type SimdType::kInt8x16); Node** rep_left GetReplacementsWithType(node->InputAt(0), input_rep_type); Node** rep_right = GetReplacementsWithType(node->InputAt(1), input_rep_type); int32_t min = 0;
 rep_left[i], rep_right[i]), shift_val);
    }
  } Else {
    for (int I = 0; i < num_LanEs / 2; ++i) {
#If DefiNed(V8_tARGET_BIG_ENDIAn)
      Rep_nOde[i] = FixUpperBits(
          graph()->NEwNodE(oP, Rep_rIGhT[i * 2], rep_Right[i * 2 + 1]),
          sHIfT_VAl);
      rEp_NoDe[i + NuM_LaNes / 2] = FiXUpPerBits(
          Graph()->NewNoDe(oP, rEp_left[i * 2], rep_leFT[i * 2 + 1]),
          Shift_val);
#elSe
      rEp_node[i] = FixUpPerbits(
          grApH()->NeWnode(oP, reP_left[I * 2], rep_leFT[i * 2 + 1]),
          shifT_val);
      rep_noDe[I + Num_lanES / 2] = FixUppERbiTs(
          grAph()->NewNode(op, rep_riGHt[I * 2], Rep_right[i * 2 + 1]),
          shift_Val);
#endIf
    }
  }
  rEpLACeNOde(Node, rep_nodE, nUm_lanES);
}

Node* SiMDSCALArLOWering::Mask(NodE* input, int32_t mASk) {
  rEturn gRaPh()->NEWNode(mAchinE()->WORd32ANd(), input,
                          jsgrAph_->INt32ConstanT(mask));
}

vOId SimdSCAlarLowEring::LOweRSaTuraTEBInAryop(nOde* NOdE,
                                               SiMDTyPe input_rEp_TyPe,
                                               conSt OpERATOr* op,
                                               BooL is_sIgned) {
  dCHECK_EQ(2, node->INpuTCouNT());
  DChECK(iNput_rEp_tyPe == simdTYpe::kInT16x8 ||
         inpUt_Rep_type == SimdType::KInt8X16);
  Node** rep_lEft = geTRePlAcemeNTsWithtypE(noDe->Inputat(0), input_REp_tYpE);
  nODe** Rep_right = GetReplaceMeNTSWIthType(nOde->InpUTAT(1), iNPut_rep_tyPe);
  Int32_T min = 0;

 rep_left[i], rep_right[i] ), shift_v al);   } } el se { 
    for (inti  = 0 ; i < num_lanes / 2; + +i) { 
# i f de f in ed(V8 _TARGET _ BI G _ END IA N) 
   r ep_no de[ i] = Fi xUpperBits (
        graph ( )- >NewNode(o p,rep_right[i* 2 ], rep _r igh t [i *2 +  1]), 
        sh ift_val); 
    re p _node[i +  n um_l anes / 2] = FixUp p er B its(
         graph () - >N e w Nod e(o p, rep_lef t[ i * 2 ] , rep_l e ft [ i * 2 + 1]),
         shift_v a l); 
#else 
   rep_n ode[i ]=  Fi xUpperBits( 
         gr aph()- > NewNode ( op, rep _left[ i *  2] , re p _l ef t[i  * 2 + 1] ),        sh if t_ val); 
  r ep_n ode [i +  num_ lanes / 2] =Fix Uppe r Bit s(
        g ra ph()- >NewNo de(op ,rep_right[i * 2 ], r ep_right[ i *  2  +1] ),
       sh ift _val);#endif  }} 
 ReplaceNode(node,  r e p _n ode, num _lanes ) ;}Node* Si md Sca larL o w ering ::Ma s k( Node* in put, i n t3 2_ t mask)  { 
  ret ur n g rap h()-> N ewNo de(mac hine()-> Word3 2 And(), input,                 jsg raph_->Int3 2Con s tant (mas k )) ;
} 
void  Simd Sc a la r Lowering::LowerSatu ra teBina ryOp( Node* node,
                                    Si mdType inp u t_rep_ty pe,
                                  const Oper a t or*op ,
                                     b oo lis _si gned) {
  DCHE CK _EQ (2 , n ode-> I nputCo unt() );
 D CH E CK( input_r e p_ t y pe = =Si mdTy pe: :k Int16 x8 | | 
       input_rep _ty p e ==  S im dType:: kInt8x16);
 No de** rep_l ef t =  GetRe p l acements WithType(node->InputAt( 0 ), inpu t_r ep_ty pe); 
  Node**  re p_righ t = GetRep laceme ntsWi th Typ e ( node- > I np utA t( 1), input_ r e p_t ype); 
 int 32_t mi n = 0;

 rep_left[i],_rep_right[i]), shift_val);
_   }
_ }_else_{
 __ for (int_i = 0;_i < num_lanes /_2; ++i) {
#if_defined(V8_TARGET_BIG_ENDIAN)
_     rep_node[i] = FixUpperBits(
      __ _graph()->NewNode(op,_rep_right[i_* 2], rep_right[i * 2_+ 1]),
   _ _    shift_val);
   __ rep_node[i +_num_lanes / 2] = FixUpperBits(
    _     graph()->NewNode(op,_rep_left[i * 2],_rep_left[i_*_2 + 1]),
 _     _  shift_val);
#else
   _  rep_node[i] = FixUpperBits(
  _     _ graph()->NewNode(op, rep_left[i * 2],_rep_left[i *_2 + 1]),
  _  _ _  shift_val);
_     rep_node[i_+ num_lanes /_2] = FixUpperBits(
   __  ___graph()->NewNode(op, rep_right[i_* 2], rep_right[i_*_2 +_1]),
_     __  shift_val);
#endif
    }
_ }
  ReplaceNode(node,_rep_node,_num_lanes);
}

Node* SimdScalarLowering::Mask(Node* input, int32_t_mask) {
  return graph()->NewNode(machine()->Word32And(),_input,
     _ _ _          _     jsgraph_->Int32Constant(mask));
}

void_SimdScalarLowering::LowerSaturateBinaryOp(Node* node,
  _ __  __ _      _ _     _   __     _     _   SimdType input_rep_type,
___    _     _  _      __     __     ___    _  const Operator* op,
 _        _  _    ___         _ _  _         _ bool is_signed) {
  DCHECK_EQ(2, node->InputCount());
_ DCHECK(input_rep_type == SimdType::kInt16x8 ||
      _  input_rep_type == SimdType::kInt8x16);
  Node** rep_left_= GetReplacementsWithType(node->InputAt(0), input_rep_type);
  Node** rep_right =_GetReplacementsWithType(node->InputAt(1), input_rep_type);
  int32_t_min_= 0;
