Changeset 4145 for parabix-LLVM


Ignore:
Timestamp:
Sep 9, 2014, 4:18:46 PM (5 years ago)
Author:
linmengl
Message:

bug fix for long stream addition.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • parabix-LLVM/llvm_git/lib/Target/X86/X86ParabixISelLowering.cpp

    r4136 r4145  
    10381038  SDNodeTreeBuilder b(&DAG, dl);
    10391039
    1040   if (DCI.isBeforeLegalize() && Subtarget->hasSSE2() && VT == MVT::i128) {
     1040  if (DCI.isBeforeLegalize() &&
     1041      ((Subtarget->hasSSE2() && VT == MVT::i128) || (Subtarget->hasAVX() && VT == MVT::i256))) {
    10411042    DEBUG(dbgs() << "Parabix combining: "; N->dump());
    10421043
     
    10551056
    10561057    //x = hsimd<64>::signmask(X), x, y, r are all i32 type
    1057     SDValue x, y, r;
     1058    SDValue x, y, r, bubble;
    10581059    if (f == 2) {
    10591060      //i128, v2i1 to i2 seems to be problematic
     
    10611062      y = b.SignMask2x64(Y);
    10621063      r = b.SignMask2x64(R);
     1064      bubble = b.SignMask2x64(b.SIGN_EXTEND(b.SETCC(R, Ones, ISD::SETEQ), VXi64Ty));
    10631065    }
    10641066    else if (f == 4) {
     
    10671069      y = b.SignMask4x64(Y);
    10681070      r = b.SignMask4x64(R);
     1071      bubble = b.SignMask4x64(b.SIGN_EXTEND(b.SETCC(R, Ones, ISD::SETEQ), VXi64Ty));
    10691072    }
    10701073    else
     
    10751078      y = b.ZERO_EXTEND(b.BITCAST(b.SETCC(Y, Zero, ISD::SETLT), MaskTy), MVT::i32);
    10761079      r = b.ZERO_EXTEND(b.BITCAST(b.SETCC(R, Zero, ISD::SETLT), MaskTy), MVT::i32);
     1080      bubble = b.ZERO_EXTEND(b.BITCAST(b.SETCC(R, Ones, ISD::SETEQ), MaskTy), MVT::i32);
    10771081    }
    10781082
    10791083    SDValue carry = b.OR(b.AND(x, y), b.AND(b.OR(x, y), b.NOT(r)));
    1080     SDValue bubble = b.ZERO_EXTEND(b.BITCAST(b.SETCC(R, Ones, ISD::SETEQ), MaskTy), MVT::i32);
    1081 
    10821084    SDValue increments = b.MatchStar(b.SHL(carry, b.Constant(1, MVT::i32)), bubble);
    10831085    SDValue carry_out = b.TRUNCATE(b.SRL(increments, b.Constant(f, MVT::i32)), MVT::i1);
Note: See TracChangeset for help on using the changeset viewer.