[PATCH] D151197: [Clang][SVE2p1] Add svpsel builtins

hassnaaHamdi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 9 05:30:38 PDT 2023


hassnaa-arm added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:9633-9635
+    bool IsSVCount = isa<TargetExtType>(Ops[0]->getType());
+    assert(((!IsSVCount || cast<TargetExtType>(Ops[0]->getType())->getName() ==
+                               "aarch64.svcount")) &&
----------------
hassnaa-arm wrote:
> for the case of sve::BI__builtin_sve_svpsel_lane_b8, 
> what is the expected value of IsSVCount ? and how the assertion statement didn't assert for the check of :
> (cast<TargetExtType>(Ops[0]->getType())->getName() ==
>                                "aarch64.svcount"))
> how is the parameter type considered as aarch64.svcount ?
Hi Carol,
I understood that part, ignore my comment.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:9642
+    Function *CastToSVCountF =
+        CGM.getIntrinsic(Intrinsic::aarch64_sve_convert_from_svbool, SVCountTy);
+
----------------
hassnaa-arm wrote:
> Isn't the type of 'SVCountTy' = 'aarch64.svcount' as a result of the statement at line 9637 ?
> So why do we need to aarch64_sve_convert_from_svbool while it's not svbool.
> Am I missing something ?
I understood that part, please ignore my comment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151197



More information about the cfe-commits mailing list