Ignore:
Timestamp:
Jul 13, 2015, 2:11:13 PM (4 years ago)
Author:
cameron
Message:

Upgrade LLVM to 3.6.1

Location:
icGREP/icgrep-devel/llvm-3.6.1.src
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/llvm-3.6.1.src/lib/Target/R600/AMDGPUISelDAGToDAG.cpp

    r4574 r4664  
    440440  }
    441441
     442  case ISD::STORE: {
     443    // Handle i64 stores here for the same reason mentioned above for loads.
     444    StoreSDNode *ST = cast<StoreSDNode>(N);
     445    SDValue Value = ST->getValue();
     446    if (Value.getValueType() != MVT::i64 || ST->isTruncatingStore())
     447      break;
     448
     449    SDValue NewValue = CurDAG->getNode(ISD::BITCAST, SDLoc(N),
     450                                      MVT::v2i32, Value);
     451    SDValue NewStore = CurDAG->getStore(ST->getChain(), SDLoc(N), NewValue,
     452                                        ST->getBasePtr(), ST->getMemOperand());
     453
     454    CurDAG->ReplaceAllUsesOfValueWith(SDValue(N, 0), NewStore);
     455
     456    if (NewValue.getOpcode() == ISD::BITCAST) {
     457      Select(NewStore.getNode());
     458      return SelectCode(NewValue.getNode());
     459    }
     460
     461    // getNode() may fold the bitcast if its input was another bitcast.  If that
     462    // happens we should only select the new store.
     463    N = NewStore.getNode();
     464    break;
     465  }
     466
    442467  case AMDGPUISD::REGISTER_LOAD: {
    443468    if (ST.getGeneration() <= AMDGPUSubtarget::NORTHERN_ISLANDS)
     
    762787}
    763788
     789// We need to handle this here because tablegen doesn't support matching
     790// instructions with multiple outputs.
    764791SDNode *AMDGPUDAGToDAGISel::SelectDIV_SCALE(SDNode *N) {
    765792  SDLoc SL(N);
     
    771798    = (VT == MVT::f64) ? AMDGPU::V_DIV_SCALE_F64 : AMDGPU::V_DIV_SCALE_F32;
    772799
    773   const SDValue Zero = CurDAG->getTargetConstant(0, MVT::i32);
    774   const SDValue False = CurDAG->getTargetConstant(0, MVT::i1);
    775   SDValue Ops[] = {
    776     Zero,             // src0_modifiers
    777     N->getOperand(0), // src0
    778     Zero,             // src1_modifiers
    779     N->getOperand(1), // src1
    780     Zero,             // src2_modifiers
    781     N->getOperand(2), // src2
    782     False,            // clamp
    783     Zero              // omod
    784   };
    785 
     800  // src0_modifiers, src0, src1_modifiers, src1, src2_modifiers, src2, clamp, omod
     801  SDValue Ops[8];
     802
     803  SelectVOP3Mods0(N->getOperand(0), Ops[1], Ops[0], Ops[6], Ops[7]);
     804  SelectVOP3Mods(N->getOperand(1), Ops[3], Ops[2]);
     805  SelectVOP3Mods(N->getOperand(2), Ops[5], Ops[4]);
    786806  return CurDAG->SelectNodeTo(N, Opc, VT, MVT::i1, Ops);
    787807}
Note: See TracChangeset for help on using the changeset viewer.