Skip to content

Commit 9329723

Browse files
committed
[NFC][AArch64] Added checks for global entries in ReplaceWithVeclib testing
This patch added checks for global entries in ReplaceWithVeclib testing using ArmPL and SLEEF vector libraries. Differential Revision: https://reviews.llvm.org/D157258
1 parent 28d8c0d commit 9329723

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

llvm/test/CodeGen/AArch64/replace-intrinsics-with-veclib-armpl.ll

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals --version 2
22
; RUN: opt -S -vector-library=ArmPL -replace-with-veclib < %s | FileCheck %s
33

44
target triple = "aarch64-unknown-linux-gnu"
@@ -14,6 +14,9 @@ declare <4 x float> @llvm.cos.v4f32(<4 x float>)
1414
declare <vscale x 2 x double> @llvm.cos.nxv2f64(<vscale x 2 x double>)
1515
declare <vscale x 4 x float> @llvm.cos.nxv4f32(<vscale x 4 x float>)
1616

17+
;.
18+
; CHECK: @[[LLVM_COMPILER_USED:[a-zA-Z0-9_$"\\.-]+]] = appending global [14 x ptr] [ptr @armpl_vcosq_f64, ptr @armpl_vcosq_f32, ptr @armpl_vsinq_f64, ptr @armpl_vsinq_f32, ptr @armpl_vexpq_f64, ptr @armpl_vexpq_f32, ptr @armpl_vexp2q_f64, ptr @armpl_vexp2q_f32, ptr @armpl_vlogq_f64, ptr @armpl_vlogq_f32, ptr @armpl_vlog2q_f64, ptr @armpl_vlog2q_f32, ptr @armpl_vlog10q_f64, ptr @armpl_vlog10q_f32], section "llvm.metadata"
19+
;.
1720
define <2 x double> @llvm_cos_f64(<2 x double> %in) {
1821
; CHECK-LABEL: define <2 x double> @llvm_cos_f64
1922
; CHECK-SAME: (<2 x double> [[IN:%.*]]) {
@@ -378,3 +381,7 @@ define <vscale x 4 x float> @llvm_pow_vscale_f32(<vscale x 4 x float> %in, <vsca
378381
}
379382

380383
attributes #0 = { "target-features"="+sve" }
384+
;.
385+
; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
386+
; CHECK: attributes #[[ATTR1]] = { "target-features"="+sve" }
387+
;.

llvm/test/CodeGen/AArch64/replace-intrinsics-with-veclib-sleef-scalable.ll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
22
; RUN: opt -mattr=+sve -vector-library=sleefgnuabi -replace-with-veclib -S < %s | FileCheck %s
33

44
target triple = "aarch64-unknown-linux-gnu"
@@ -405,3 +405,7 @@ declare <vscale x 2 x double> @llvm.sqrt.nxv2f64(<vscale x 2 x double>)
405405
declare <vscale x 4 x float> @llvm.sqrt.nxv4f32(<vscale x 4 x float>)
406406
declare <vscale x 2 x double> @llvm.trunc.nxv2f64(<vscale x 2 x double>)
407407
declare <vscale x 4 x float> @llvm.trunc.nxv4f32(<vscale x 4 x float>)
408+
;.
409+
; CHECK: attributes #[[ATTR0:[0-9]+]] = { "target-features"="+sve" }
410+
; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) "target-features"="+sve" }
411+
;.

llvm/test/CodeGen/AArch64/replace-intrinsics-with-veclib-sleef.ll

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
22
; RUN: opt -vector-library=sleefgnuabi -replace-with-veclib -S < %s | FileCheck %s
33

44
target triple = "aarch64-unknown-linux-gnu"
55

6+
;.
7+
; CHECK: @[[LLVM_COMPILER_USED:[a-zA-Z0-9_$"\\.-]+]] = appending global [14 x ptr] [ptr @_ZGVnN2v_cos, ptr @_ZGVnN4v_cosf, ptr @_ZGVnN2v_exp, ptr @_ZGVnN4v_expf, ptr @_ZGVnN2v_exp2, ptr @_ZGVnN4v_exp2f, ptr @_ZGVnN2v_log, ptr @_ZGVnN4v_logf, ptr @_ZGVnN2v_log10, ptr @_ZGVnN4v_log10f, ptr @_ZGVnN2v_log2, ptr @_ZGVnN4v_log2f, ptr @_ZGVnN2v_sin, ptr @_ZGVnN4v_sinf], section "llvm.metadata"
8+
;.
69
define <2 x double> @llvm_ceil_f64(<2 x double> %in) {
710
; CHECK-LABEL: @llvm_ceil_f64(
811
; CHECK-NEXT: [[TMP1:%.*]] = call fast <2 x double> @llvm.ceil.v2f64(<2 x double> [[IN:%.*]])
@@ -403,3 +406,6 @@ declare <2 x double> @llvm.sqrt.v2f64(<2 x double>)
403406
declare <4 x float> @llvm.sqrt.v4f32(<4 x float>)
404407
declare <2 x double> @llvm.trunc.v2f64(<2 x double>)
405408
declare <4 x float> @llvm.trunc.v4f32(<4 x float>)
409+
;.
410+
; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
411+
;.

0 commit comments

Comments
 (0)