[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
Fri Jul 1 02:35:02 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:
> sdesmalen wrote:
> > 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.
> I'm not totally against its use here, I mean it does reduce the line wrapping :), I'm just a little conscious of compiler time creep.
In that case, I prefer to keep it as-is.


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