[llvm] [SPIR-V] Allow intrinsics with aggregate return type to reach GlobalISel (PR #108893)
Vyacheslav Levytskyy via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 20 02:34:25 PDT 2024
================
@@ -188,6 +188,40 @@ bool isConvergenceIntrinsic(const Instruction *I) {
II->getIntrinsicID() == Intrinsic::experimental_convergence_loop ||
II->getIntrinsicID() == Intrinsic::experimental_convergence_anchor;
}
+
+bool isInternalNonVoidIntrinsic(const Value *I) {
+ if (const auto *II = dyn_cast<IntrinsicInst>(I))
+ switch (II->getIntrinsicID()) {
----------------
VyacheslavLevytskyy wrote:
I think you are right. My motivation was to explore the topic further and widen applicability of this PR's way to pass info through passes, but we may extend/address this later if needed. Another motivation was that internal intrinsics are intended for quite different things, and it's hard to separate them as a class to use in conditions, but this again doesn't matter in case of this PR specifically.
So for goals of this PR it may be better indeed to be more general and don't list intrinsics explicitly, and I've changed the explicit list to `F->getName().starts_with("llvm.spv.")` to exclude internal SPIR-V backend intrinsics.
https://github.com/llvm/llvm-project/pull/108893
More information about the llvm-commits
mailing list