[llvm] [AArch64] Improve index selection for histograms (PR #111150)
James Chesterman via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 7 09:09:26 PDT 2024
================
@@ -24079,12 +24080,32 @@ static bool findMoreOptimalIndexType(const MaskedGatherScatterSDNode *N,
static SDValue performMaskedGatherScatterCombine(
SDNode *N, TargetLowering::DAGCombinerInfo &DCI, SelectionDAG &DAG) {
- MaskedGatherScatterSDNode *MGS = cast<MaskedGatherScatterSDNode>(N);
- assert(MGS && "Can only combine gather load or scatter store nodes");
-
if (!DCI.isBeforeLegalize())
return SDValue();
+ if (N->getOpcode() == ISD::EXPERIMENTAL_VECTOR_HISTOGRAM) {
+ MaskedHistogramSDNode *HG = cast<MaskedHistogramSDNode>(N);
+ assert(HG &&
+ "Can only combine gather load, scatter store or histogram nodes");
----------------
JamesChesterman wrote:
Yes you're right, I've removed the other assert statement from this function too.
https://github.com/llvm/llvm-project/pull/111150
More information about the llvm-commits
mailing list