| // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals all --version 5 |
| // RUN: %clang_cc1 -triple loongarch64 -emit-llvm %s -o - | FileCheck %s |
| |
| __attribute__((target("div32"))) |
| // CHECK-LABEL: define dso_local void @testdiv32( |
| // CHECK-SAME: ) #[[ATTR0:[0-9]+]] { |
| // CHECK-NEXT: [[ENTRY:.*:]] |
| // CHECK-NEXT: ret void |
| // |
| void testdiv32() {} |
| |
| __attribute__((target("arch=loongarch64"))) |
| // CHECK-LABEL: define dso_local void @testLoongarch64( |
| // CHECK-SAME: ) #[[ATTR1:[0-9]+]] { |
| // CHECK-NEXT: [[ENTRY:.*:]] |
| // CHECK-NEXT: ret void |
| // |
| void testLoongarch64() {} |
| |
| __attribute__((target("arch=la64v1.0"))) |
| // CHECK-LABEL: define dso_local void @testLa64v10( |
| // CHECK-SAME: ) #[[ATTR2:[0-9]+]] { |
| // CHECK-NEXT: [[ENTRY:.*:]] |
| // CHECK-NEXT: ret void |
| // |
| void testLa64v10() {} |
| |
| __attribute__((target("arch=la64v1.1"))) |
| // CHECK-LABEL: define dso_local void @testLa64v11( |
| // CHECK-SAME: ) #[[ATTR3:[0-9]+]] { |
| // CHECK-NEXT: [[ENTRY:.*:]] |
| // CHECK-NEXT: ret void |
| // |
| void testLa64v11() {} |
| |
| __attribute__((target("arch=la464"))) |
| // CHECK-LABEL: define dso_local void @testLa464( |
| // CHECK-SAME: ) #[[ATTR4:[0-9]+]] { |
| // CHECK-NEXT: [[ENTRY:.*:]] |
| // CHECK-NEXT: ret void |
| // |
| void testLa464() {} |
| |
| __attribute__((target("arch=la664"))) |
| // CHECK-LABEL: define dso_local void @testLa664( |
| // CHECK-SAME: ) #[[ATTR5:[0-9]+]] { |
| // CHECK-NEXT: [[ENTRY:.*:]] |
| // CHECK-NEXT: ret void |
| // |
| void testLa664() {} |
| |
| __attribute__((target("arch=la664, no-div32"))) |
| // CHECK-LABEL: define dso_local void @la664Nodiv32( |
| // CHECK-SAME: ) #[[ATTR6:[0-9]+]] { |
| // CHECK-NEXT: [[ENTRY:.*:]] |
| // CHECK-NEXT: ret void |
| // |
| void la664Nodiv32() {} |
| |
| __attribute__((target("tune=la464"))) |
| // CHECK-LABEL: define dso_local void @tuneLa464( |
| // CHECK-SAME: ) #[[ATTR7:[0-9]+]] { |
| // CHECK-NEXT: [[ENTRY:.*:]] |
| // CHECK-NEXT: ret void |
| // |
| void tuneLa464() {} |
| |
| __attribute__((target("arch=la464, tune=la664"))) |
| // CHECK-LABEL: define dso_local void @archLa464tuneLa664( |
| // CHECK-SAME: ) #[[ATTR8:[0-9]+]] { |
| // CHECK-NEXT: [[ENTRY:.*:]] |
| // CHECK-NEXT: ret void |
| // |
| void archLa464tuneLa664() {} |
| |
| //. |
| // CHECK: attributes #[[ATTR0]] = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+64bit,+div32" } |
| // CHECK: attributes #[[ATTR1]] = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="loongarch64" "target-features"="+64bit,+d,+f,+ual" } |
| // CHECK: attributes #[[ATTR2]] = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="loongarch64" "target-features"="+64bit,+d,+lsx,+ual" } |
| // CHECK: attributes #[[ATTR3]] = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="loongarch64" "target-features"="+64bit,+d,+div32,+frecipe,+lam-bh,+lamcas,+ld-seq-sa,+lsx,+scq,+ual" } |
| // CHECK: attributes #[[ATTR4]] = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="la464" "target-features"="+64bit,+d,+f,+lasx,+lsx,+ual" } |
| // CHECK: attributes #[[ATTR5]] = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="la664" "target-features"="+64bit,+d,+div32,+f,+frecipe,+lam-bh,+lamcas,+lasx,+ld-seq-sa,+lsx,+scq,+ual" } |
| // CHECK: attributes #[[ATTR6]] = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="la664" "target-features"="+64bit,+d,+f,+frecipe,+lam-bh,+lamcas,+lasx,+ld-seq-sa,+lsx,+scq,+ual,-div32" } |
| // CHECK: attributes #[[ATTR7]] = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+64bit" "tune-cpu"="la464" } |
| // CHECK: attributes #[[ATTR8]] = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="la464" "target-features"="+64bit,+d,+f,+lasx,+lsx,+ual" "tune-cpu"="la664" } |
| //. |
| // CHECK: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4} |
| // CHECK: [[META1:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"} |
| //. |