[llvm] [AArch64] Improve index selection for histograms (PR #111150)

Sam Tebbs via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 02:01:06 PDT 2024


================
@@ -24079,11 +24080,9 @@ 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");
----------------
SamTebbs33 wrote:

Oh the assertion isn't necessary as the `cast` call will do that. I do think moving the `MGS` declaration is unnecessary though.

https://github.com/llvm/llvm-project/pull/111150


More information about the llvm-commits mailing list