@@ -3383,65 +3383,15 @@ static SDValue TryMatchTrue(SDNode *N, EVT VecVT, SelectionDAG &DAG) {
3383
3383
return DAG.getZExtOrTrunc (Ret, DL, N->getValueType (0 ));
3384
3384
}
3385
3385
3386
- // / Try to convert a i128 comparison to a v16i8 comparison before type
3387
- // / legalization splits it up into chunks
3388
- static SDValue
3389
- combineVectorSizedSetCCEquality (SDNode *N, TargetLowering::DAGCombinerInfo &DCI,
3390
- const WebAssemblySubtarget *Subtarget) {
3391
-
3392
- SDLoc DL (N);
3393
- SDValue X = N->getOperand (0 );
3394
- SDValue Y = N->getOperand (1 );
3395
- EVT VT = N->getValueType (0 );
3396
- EVT OpVT = X.getValueType ();
3397
-
3398
- SelectionDAG &DAG = DCI.DAG ;
3399
- if (DCI.DAG .getMachineFunction ().getFunction ().hasFnAttribute (
3400
- Attribute::NoImplicitFloat))
3401
- return SDValue ();
3402
-
3403
- ISD::CondCode CC = cast<CondCodeSDNode>(N->getOperand (2 ))->get ();
3404
- // We're looking for an oversized integer equality comparison with SIMD
3405
- if (!OpVT.isScalarInteger () || !OpVT.isByteSized () || OpVT != MVT::i128 ||
3406
- !Subtarget->hasSIMD128 () || !isIntEqualitySetCC (CC))
3407
- return SDValue ();
3408
-
3409
- // Don't perform this combine if constructing the vector will be expensive.
3410
- auto IsVectorBitCastCheap = [](SDValue X) {
3411
- X = peekThroughBitcasts (X);
3412
- return isa<ConstantSDNode>(X) || X.getOpcode () == ISD::LOAD;
3413
- };
3414
-
3415
- if (!IsVectorBitCastCheap (X) || !IsVectorBitCastCheap (Y))
3416
- return SDValue ();
3417
-
3418
- SDValue VecX = DAG.getBitcast (MVT::v16i8, X);
3419
- SDValue VecY = DAG.getBitcast (MVT::v16i8, Y);
3420
- SDValue Cmp = DAG.getSetCC (DL, MVT::v16i8, VecX, VecY, CC);
3421
-
3422
- SDValue Intr =
3423
- DAG.getNode (ISD::INTRINSIC_WO_CHAIN, DL, MVT::i32 ,
3424
- {DAG.getConstant (CC == ISD::SETEQ ? Intrinsic::wasm_alltrue
3425
- : Intrinsic::wasm_anytrue,
3426
- DL, MVT::i32 ),
3427
- Cmp});
3428
-
3429
- return DAG.getSetCC (DL, VT, Intr, DAG.getConstant (0 , DL, MVT::i32 ), CC);
3430
- }
3431
-
3432
3386
static SDValue performSETCCCombine (SDNode *N,
3433
- TargetLowering::DAGCombinerInfo &DCI,
3434
- const WebAssemblySubtarget *Subtarget) {
3387
+ TargetLowering::DAGCombinerInfo &DCI) {
3435
3388
if (!DCI.isBeforeLegalize ())
3436
3389
return SDValue ();
3437
3390
3438
3391
EVT VT = N->getValueType (0 );
3439
3392
if (!VT.isScalarInteger ())
3440
3393
return SDValue ();
3441
3394
3442
- if (SDValue V = combineVectorSizedSetCCEquality (N, DCI, Subtarget))
3443
- return V;
3444
-
3445
3395
SDValue LHS = N->getOperand (0 );
3446
3396
if (LHS->getOpcode () != ISD::BITCAST)
3447
3397
return SDValue ();
@@ -3621,7 +3571,7 @@ WebAssemblyTargetLowering::PerformDAGCombine(SDNode *N,
3621
3571
case ISD::BITCAST:
3622
3572
return performBitcastCombine (N, DCI);
3623
3573
case ISD::SETCC:
3624
- return performSETCCCombine (N, DCI, Subtarget );
3574
+ return performSETCCCombine (N, DCI);
3625
3575
case ISD::VECTOR_SHUFFLE:
3626
3576
return performVECTOR_SHUFFLECombine (N, DCI);
3627
3577
case ISD::SIGN_EXTEND:
0 commit comments