110 lines
5.0 KiB
C
110 lines
5.0 KiB
C
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
|
|
// RUN: %clang_cc1 -triple aarch64-eabi -S -emit-llvm %s -o - | FileCheck %s
|
|
|
|
// CHECK-LABEL: @v82() #0
|
|
__attribute__((target("arch=armv8.2-a")))
|
|
void v82() {}
|
|
// CHECK-LABEL: @v82sve() #1
|
|
__attribute__((target("arch=armv8.2-a+sve")))
|
|
void v82sve() {}
|
|
// CHECK-LABEL: @v82sve2() #2
|
|
__attribute__((target("arch=armv8.2-a+sve2")))
|
|
void v82sve2() {}
|
|
// CHECK-LABEL: @v82svesve2() #3
|
|
__attribute__((target("arch=armv8.2-a+sve+sve2")))
|
|
void v82svesve2() {}
|
|
// CHECK-LABEL: @v86sve2() #4
|
|
__attribute__((target("arch=armv8.6-a+sve2")))
|
|
void v86sve2() {}
|
|
|
|
// CHECK-LABEL: @a710() #5
|
|
__attribute__((target("cpu=cortex-a710")))
|
|
void a710() {}
|
|
// CHECK-LABEL: @tunea710() #6
|
|
__attribute__((target("tune=cortex-a710")))
|
|
void tunea710() {}
|
|
// CHECK-LABEL: @generic() #7
|
|
__attribute__((target("cpu=generic")))
|
|
void generic() {}
|
|
// CHECK-LABEL: @tune() #8
|
|
__attribute__((target("tune=generic")))
|
|
void tune() {}
|
|
|
|
// CHECK-LABEL: @n1tunea710() #9
|
|
__attribute__((target("cpu=neoverse-n1,tune=cortex-a710")))
|
|
void n1tunea710() {}
|
|
// CHECK-LABEL: @svetunea710() #10
|
|
__attribute__((target("sve,tune=cortex-a710")))
|
|
void svetunea710() {}
|
|
// CHECK-LABEL: @plussvetunea710() #10
|
|
__attribute__((target("+sve,tune=cortex-a710")))
|
|
void plussvetunea710() {}
|
|
// CHECK-LABEL: @v1plussve2() #11
|
|
__attribute__((target("cpu=neoverse-v1,+sve2")))
|
|
void v1plussve2() {}
|
|
// CHECK-LABEL: @v1sve2() #11
|
|
__attribute__((target("cpu=neoverse-v1+sve2")))
|
|
void v1sve2() {}
|
|
// CHECK-LABEL: @v1minussve() #12
|
|
__attribute__((target("cpu=neoverse-v1,+nosve")))
|
|
void v1minussve() {}
|
|
// CHECK-LABEL: @v1nosve() #12
|
|
__attribute__((target("cpu=neoverse-v1,no-sve")))
|
|
void v1nosve() {}
|
|
// CHECK-LABEL: @v1msve() #12
|
|
__attribute__((target("cpu=neoverse-v1+nosve")))
|
|
void v1msve() {}
|
|
|
|
// CHECK-LABEL: @plussve() #13
|
|
__attribute__((target("+sve")))
|
|
void plussve() {}
|
|
// CHECK-LABEL: @plussveplussve2() #14
|
|
__attribute__((target("+sve+nosve2")))
|
|
void plussveplussve2() {}
|
|
// CHECK-LABEL: @plussveminusnosve2() #14
|
|
__attribute__((target("sve,no-sve2")))
|
|
void plussveminusnosve2() {}
|
|
// CHECK-LABEL: @plusfp16() #15
|
|
__attribute__((target("+fp16")))
|
|
void plusfp16() {}
|
|
|
|
// CHECK-LABEL: @all() #16
|
|
__attribute__((target("cpu=neoverse-n1,tune=cortex-a710,arch=armv8.6-a+sve2")))
|
|
void all() {}
|
|
// CHECK-LABEL: @allplusbranchprotection() #17
|
|
__attribute__((target("cpu=neoverse-n1,tune=cortex-a710,arch=armv8.6-a+sve2,branch-protection=standard")))
|
|
void allplusbranchprotection() {}
|
|
|
|
// These tests check that the user facing and internal llvm name are both accepted.
|
|
// CHECK-LABEL: @plusnoneon() #18
|
|
__attribute__((target("+noneon")))
|
|
void plusnoneon() {}
|
|
// CHECK-LABEL: @plusnosimd() #18
|
|
__attribute__((target("+nosimd")))
|
|
void plusnosimd() {}
|
|
// CHECK-LABEL: @noneon() #18
|
|
__attribute__((target("no-neon")))
|
|
void noneon() {}
|
|
// CHECK-LABEL: @nosimd() #18
|
|
__attribute__((target("no-simd")))
|
|
void nosimd() {}
|
|
|
|
// CHECK: attributes #0 = { {{.*}} "target-features"="+v8.1a,+v8.2a,+v8a" }
|
|
// CHECK: attributes #1 = { {{.*}} "target-features"="+sve,+v8.1a,+v8.2a,+v8a" }
|
|
// CHECK: attributes #2 = { {{.*}} "target-features"="+sve2,+v8.1a,+v8.2a,+v8a" }
|
|
// CHECK: attributes #4 = { {{.*}} "target-features"="+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8.6a,+v8a" }
|
|
// CHECK: attributes #5 = { {{.*}} "target-cpu"="cortex-a710" "target-features"="+bf16,+crc,+dotprod,+flagm,+fp-armv8,+fp16fml,+i8mm,+lse,+mte,+neon,+pauth,+ras,+rcpc,+rdm,+sb,+sve,+sve2,+sve2-bitperm" }
|
|
// CHECK: attributes #6 = { {{.*}} "tune-cpu"="cortex-a710" }
|
|
// CHECK: attributes #7 = { {{.*}} "target-cpu"="generic" }
|
|
// CHECK: attributes #8 = { {{.*}} "tune-cpu"="generic" }
|
|
// CHECK: attributes #9 = { {{.*}} "target-cpu"="neoverse-n1" "target-features"="+crc,+crypto,+dotprod,+fp-armv8,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+spe,+ssbs" "tune-cpu"="cortex-a710" }
|
|
// CHECK: attributes #10 = { {{.*}} "target-features"="+sve" "tune-cpu"="cortex-a710" }
|
|
// CHECK: attributes #11 = { {{.*}} "target-cpu"="neoverse-v1" "target-features"="+bf16,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+i8mm,+lse,+neon,+rand,+ras,+rcpc,+rdm,+spe,+ssbs,+sve,+sve2" }
|
|
// CHECK: attributes #12 = { {{.*}} "target-cpu"="neoverse-v1" "target-features"="+bf16,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+i8mm,+lse,+neon,+rand,+ras,+rcpc,+rdm,+spe,+ssbs,-sve" }
|
|
// CHECK: attributes #13 = { {{.*}} "target-features"="+sve" }
|
|
// CHECK: attributes #14 = { {{.*}} "target-features"="+sve,-sve2" }
|
|
// CHECK: attributes #15 = { {{.*}} "target-features"="+fullfp16" }
|
|
// CHECK: attributes #16 = { {{.*}} "target-cpu"="neoverse-n1" "target-features"="+crc,+crypto,+dotprod,+fp-armv8,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+spe,+ssbs,+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8.6a,+v8a" "tune-cpu"="cortex-a710" }
|
|
// CHECK: attributes #17 = { {{.*}} "branch-target-enforcement"="true" {{.*}} "target-cpu"="neoverse-n1" "target-features"="+crc,+crypto,+dotprod,+fp-armv8,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+spe,+ssbs,+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8.6a,+v8a" "tune-cpu"="cortex-a710" }
|
|
// CHECK: attributes #18 = { {{.*}} "target-features"="-neon" }
|