[llvm] [AArch64][SelectionDAG] Improve codegen for insert_into_scalable(zext_fixed_length_vector) (PR #192405)
Ricardo Jesus via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 16 01:06:23 PDT 2026
================
@@ -20942,12 +20942,30 @@ static SDValue performReinterpretCastCombine(SDNode *N) {
return SDValue();
}
+// and(splat(1), sext(setcc_merge_zero)) -> zext(setcc_merge_zero)
+SDValue performSVEAndSplatSetCCMergeZeroCombine(SDNode *N, SelectionDAG &DAG) {
+ SDLoc DL(N);
+ SDValue SplatOp = N->getOperand(0);
+ SDValue NonSplatOp = N->getOperand(1);
+ if (NonSplatOp.getOpcode() == ISD::SPLAT_VECTOR)
+ std::swap(SplatOp, NonSplatOp);
+ SDValue Compare = NonSplatOp.getOperand(0);
+ if (SplatOp.getOpcode() != ISD::SPLAT_VECTOR ||
----------------
rj-jesus wrote:
You need to check that the splat value is 1.
https://github.com/llvm/llvm-project/pull/192405
More information about the llvm-commits
mailing list