diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2024-01-09 20:00:28 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-19 21:14:10 +0000 | 
| commit | cdc20ff6a7f12464aed70d9b6e67ea07da9f0399 (patch) | |
| tree | 0c2f259d41b6d1f146c344cb9cf2b15ea99d35bb /contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | |
| parent | 7adf29b6244fe016ef869f287a66048195f9af29 (diff) | |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | 15 | 
1 files changed, 7 insertions, 8 deletions
diff --git a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp index 102fd0c3dae2..47e665176e8b 100644 --- a/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -3588,8 +3588,7 @@ static SDValue getAArch64Cmp(SDValue LHS, SDValue RHS, ISD::CondCode CC,    //    cmp     w13, w12    // can be turned into:    //    cmp     w12, w11, lsl #1 -  if (!isa<ConstantSDNode>(RHS) || -      !isLegalArithImmed(cast<ConstantSDNode>(RHS)->getZExtValue())) { +  if (!isa<ConstantSDNode>(RHS) || !isLegalArithImmed(RHS->getAsZExtVal())) {      SDValue TheLHS = isCMN(LHS, CC) ? LHS.getOperand(1) : LHS;      if (getCmpOperandFoldingProfit(TheLHS) > getCmpOperandFoldingProfit(RHS)) { @@ -3623,7 +3622,7 @@ static SDValue getAArch64Cmp(SDValue LHS, SDValue RHS, ISD::CondCode CC,          cast<LoadSDNode>(LHS)->getExtensionType() == ISD::ZEXTLOAD &&          cast<LoadSDNode>(LHS)->getMemoryVT() == MVT::i16 &&          LHS.getNode()->hasNUsesOfValue(1, 0)) { -      int16_t ValueofRHS = cast<ConstantSDNode>(RHS)->getZExtValue(); +      int16_t ValueofRHS = RHS->getAsZExtVal();        if (ValueofRHS < 0 && isLegalArithImmed(-ValueofRHS)) {          SDValue SExt =              DAG.getNode(ISD::SIGN_EXTEND_INREG, dl, LHS.getValueType(), LHS, @@ -5619,7 +5618,7 @@ SDValue AArch64TargetLowering::LowerMGATHER(SDValue Op,    // SVE supports an index scaled by sizeof(MemVT.elt) only, everything else    // must be calculated before hand. -  uint64_t ScaleVal = cast<ConstantSDNode>(Scale)->getZExtValue(); +  uint64_t ScaleVal = Scale->getAsZExtVal();    if (IsScaled && ScaleVal != MemVT.getScalarStoreSize()) {      assert(isPowerOf2_64(ScaleVal) && "Expecting power-of-two types");      EVT IndexVT = Index.getValueType(); @@ -5707,7 +5706,7 @@ SDValue AArch64TargetLowering::LowerMSCATTER(SDValue Op,    // SVE supports an index scaled by sizeof(MemVT.elt) only, everything else    // must be calculated before hand. -  uint64_t ScaleVal = cast<ConstantSDNode>(Scale)->getZExtValue(); +  uint64_t ScaleVal = Scale->getAsZExtVal();    if (IsScaled && ScaleVal != MemVT.getScalarStoreSize()) {      assert(isPowerOf2_64(ScaleVal) && "Expecting power-of-two types");      EVT IndexVT = Index.getValueType(); @@ -16516,9 +16515,9 @@ static SDValue performUADDVAddCombine(SDValue A, SelectionDAG &DAG) {      if (Ext0.getOperand(0).getValueType().getVectorNumElements() !=          VT.getVectorNumElements() * 2)        return SDValue(); -    if ((Ext0.getConstantOperandVal(1) != 0 && +    if ((Ext0.getConstantOperandVal(1) != 0 ||           Ext1.getConstantOperandVal(1) != VT.getVectorNumElements()) && -        (Ext1.getConstantOperandVal(1) != 0 && +        (Ext1.getConstantOperandVal(1) != 0 ||           Ext0.getConstantOperandVal(1) != VT.getVectorNumElements()))        return SDValue();      unsigned Opcode = Op0.getOpcode() == ISD::ZERO_EXTEND ? AArch64ISD::UADDLP @@ -22011,7 +22010,7 @@ static SDValue performBRCONDCombine(SDNode *N,    SDValue Cmp = N->getOperand(3);    assert(isa<ConstantSDNode>(CCVal) && "Expected a ConstantSDNode here!"); -  unsigned CC = cast<ConstantSDNode>(CCVal)->getZExtValue(); +  unsigned CC = CCVal->getAsZExtVal();    if (CC != AArch64CC::EQ && CC != AArch64CC::NE)      return SDValue();  | 
