[llvm] [AArch64][SVE2] SVE2 NBSL instruction lowering. (PR #89732)

Dinar Temirbulatov via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 07:16:58 PDT 2024


================
@@ -3750,6 +3750,23 @@ let Predicates = [HasSVE2orSME] in {
 
   // SVE2 extract vector (immediate offset, constructive)
   def EXT_ZZI_B : sve2_int_perm_extract_i_cons<"ext">;
+
+  // zext(cmpeq(bsl(x, y, z), splat(0))) -> nbsl(x, y, z)
+  def : Pat<(nxv16i8 (zext (nxv16i1 (AArch64setcc_z (nxv16i1 (SVEAllActive)),
+            (nxv16i8 (AArch64bsp nxv16i8:$Op1, nxv16i8:$Op2, nxv16i8:$Op3)), (SVEDup0), SETEQ)))),
+            (NBSL_ZZZZ nxv16i8:$Op1, nxv16i8:$Op2, nxv16i8:$Op3)>;
----------------
dtemirbulatov wrote:

Done.

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


More information about the llvm-commits mailing list