[llvm] llvm: honor VFABI mappings without builtin suppression (PR #193884)

Graham Hunter via llvm-commits llvm-commits at lists.llvm.org
Thu May 14 05:14:24 PDT 2026


================
@@ -0,0 +1,51 @@
+; RUN: opt -passes=loop-vectorize -S < %s | FileCheck %s
+
+; NOTE: This is a focused reproducer for OpenMP declare-simd style VFABI mapping.
+
+target triple = "x86_64-unknown-linux-gnu"
+
+define i32 @test_vector_abi() local_unnamed_addr #0 {
+entry:
+  br label %loop
+
+loop:
+  %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
+  %src = getelementptr inbounds nuw double, ptr @c, i64 %iv
+  %v = load double, ptr %src, align 8, !tbaa !4, !llvm.access.group !8
+  %r = tail call double @acosh(double noundef %v) #2, !llvm.access.group !8
+  %dst = getelementptr inbounds nuw double, ptr @x, i64 %iv
+  store double %r, ptr %dst, align 8, !tbaa !4, !llvm.access.group !8
+  %iv.next = add nuw nsw i64 %iv, 1
+  %done = icmp eq i64 %iv.next, 1000
+  br i1 %done, label %exit, label %loop, !llvm.loop !9
+
+exit:
+  ret i32 0
+}
+
+ at x = dso_local local_unnamed_addr global [1000 x double] zeroinitializer, align 16
+ at c = dso_local local_unnamed_addr global [1000 x double] zeroinitializer, align 16
+
+; CHECK-LABEL: @test_vector_abi(
+; CHECK: vector.body:
+; CHECK: call <2 x double> @_ZGVbN2v_acosh
+
+declare double @acosh(double noundef) local_unnamed_addr #1
+
+declare <2 x double> @_ZGVbN2v_acosh(<2 x double>)
----------------
huntergr-arm wrote:

We only need a single mapping here I think, for `_ZGV_LLVM_N2v_acosh` (being target-agnostic)

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


More information about the llvm-commits mailing list