[llvm] [AArch64][SVE] Handle some cases of uzp1/reinterpret from svbool in isZeroingInactiveLanes (PR #78623)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 8 10:46:16 PST 2024


================
@@ -283,6 +283,24 @@ static bool isZeroingInactiveLanes(SDValue Op) {
     switch (Op.getConstantOperandVal(0)) {
     default:
       return false;
+
+    case Intrinsic::aarch64_sve_uzp1:
+      return isZeroingInactiveLanes(Op.getOperand(1)) &&
+             isZeroingInactiveLanes(Op.getOperand(2));
----------------
paulwalker-arm wrote:

I see, thanks for the info.  I certainly prefer the idea of having this as an instcombine so I'll take a look at the other PR.  Looking at the IR I do wonder though if you're just emitting the wrong intrinsics and rather than using `sve.uzp1` for everything you could use the larger element variants (e.g. `sve.uzp1.b16`) that operate on `vscale x 16 x i1` and thus you remove the need for `sve.convert.from.svbool` intrinsics.

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


More information about the llvm-commits mailing list