[llvm] 3f919df - [AArch64][SVE] Use getPTrue uniformly.NFC.
Jun Ma via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 27 05:04:08 PDT 2021
Author: Jun Ma
Date: 2021-08-27T20:03:48+08:00
New Revision: 3f919dfe0de84b9ec288d6126eb8126826a25fcc
URL: https://github.com/llvm/llvm-project/commit/3f919dfe0de84b9ec288d6126eb8126826a25fcc
DIFF: https://github.com/llvm/llvm-project/commit/3f919dfe0de84b9ec288d6126eb8126826a25fcc.diff
LOG: [AArch64][SVE] Use getPTrue uniformly.NFC.
Added:
Modified:
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 1a6e68d7dced8..3ca8fcfc8e6c9 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -4007,8 +4007,8 @@ SDValue AArch64TargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
return DAG.getNode(AArch64ISD::SPLICE, dl, Op.getValueType(),
Op.getOperand(1), Op.getOperand(2), Op.getOperand(3));
case Intrinsic::aarch64_sve_ptrue:
- return DAG.getNode(AArch64ISD::PTRUE, dl, Op.getValueType(),
- Op.getOperand(1));
+ return getPTrue(DAG, dl, Op.getValueType(),
+ cast<ConstantSDNode>(Op.getOperand(1))->getZExtValue());
case Intrinsic::aarch64_sve_clz:
return DAG.getNode(AArch64ISD::CTLZ_MERGE_PASSTHRU, dl, Op.getValueType(),
Op.getOperand(2), Op.getOperand(3), Op.getOperand(1));
@@ -18080,8 +18080,7 @@ static SDValue getPredicateForFixedLengthVector(SelectionDAG &DAG, SDLoc &DL,
break;
}
- return DAG.getNode(AArch64ISD::PTRUE, DL, MaskVT,
- DAG.getTargetConstant(PgPattern, DL, MVT::i64));
+ return getPTrue(DAG, DL, MaskVT, PgPattern);
}
static SDValue getPredicateForScalableVector(SelectionDAG &DAG, SDLoc &DL,
More information about the llvm-commits
mailing list