[PATCH] D128926: [AArch64] NFC: Move safe predicate casting to a separate function.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 09:29:27 PDT 2022


sdesmalen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:4514
   case Intrinsic::aarch64_sve_convert_from_svbool:
-    return DAG.getNode(AArch64ISD::REINTERPRET_CAST, dl, Op.getValueType(),
-                       Op.getOperand(1));
+    return getSVESafePredicateBitCast(Op.getValueType(), Op.getOperand(1), DAG);
   case Intrinsic::aarch64_sve_convert_to_svbool:
----------------
paulwalker-arm wrote:
> Why is this change needed? This is the scenario when `AArch64ISD::REINTERPRET_CAST` is safe to use directly?
It's not strictly needed, but the function implements this behaviour so I figured we might just as well use it. I can also restrict getSVEPredicateBitCast to only "widening" casts.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128926/new/

https://reviews.llvm.org/D128926



More information about the llvm-commits mailing list