[llvm] [AArch64] Add @llvm.experimental.vector.match (PR #101974)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 06:43:06 PST 2024


================
@@ -2052,6 +2052,19 @@ bool AArch64TargetLowering::shouldExpandCttzElements(EVT VT) const {
          VT != MVT::v4i1 && VT != MVT::v2i1;
 }
 
+bool AArch64TargetLowering::shouldExpandVectorMatch(EVT VT,
+                                                    unsigned SearchSize) const {
+  // MATCH is SVE2 and only available in non-streaming mode.
+  if (!Subtarget->hasSVE2() || !Subtarget->isSVEAvailable())
+    return true;
+  // Furthermore, we can only use it for 8-bit or 16-bit characters.
----------------
paulwalker-arm wrote:

```suggestion
  // Furthermore, we can only use it for 8-bit or 16-bit elements.
```

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


More information about the llvm-commits mailing list