[clang] [llvm] [Arch64][SVE] Lower svrev_* to llvm.vector.reverse and fold svrev(svrev(x)) -> x (PR #116422)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 13 07:23:08 PST 2025


================
@@ -22270,6 +22299,15 @@ static SDValue performIntrinsicCombine(SDNode *N,
     return tryConvertSVEWideCompare(N, ISD::SETULT, DCI, DAG);
   case Intrinsic::aarch64_sve_cmpls_wide:
     return tryConvertSVEWideCompare(N, ISD::SETULE, DCI, DAG);
+  case Intrinsic::aarch64_sve_rev:
----------------
sdesmalen-arm wrote:

`aarch64_sve_rev` doesn't need handling here because it is replaced by `llvm.vector.reverse`.

Could you remove the intrinsic and also add a case in AutoUpgrade.cpp to replace `aarch64.sve.rev` -> `vector.reverse`?

That may be something to pull out into a separate PR.

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


More information about the llvm-commits mailing list