llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-powerpc

Author: David Blaikie (dwblaikie)

<details>
<summary>Changes</summary>

Matches GCC behavior for optnone, and a more general sense of what
"optnone" means, when it comes to interprocedural optimizations.

Some history here:
https://discourse.llvm.org/t/revisiting-refining-the-definition-of-optnone-with-interprocedural-transformations/58095/38
https://reviews.llvm.org/D101011
https://discourse.llvm.org/t/noipa-continues/74411
https://github.com/llvm/llvm-project/pull/203304


---

Patch is 260.89 KiB, truncated to 20.00 KiB below, full version: 
https://github.com/llvm/llvm-project/pull/218782.diff


97 Files Affected:

- (modified) clang/lib/CodeGen/CodeGenModule.cpp (+5) 
- (modified) clang/test/CXX/special/class.dtor/p3-0x.cpp (+1-1) 
- (modified) clang/test/CodeGen/2008-04-08-NoExceptions.c (+1-1) 
- (modified) clang/test/CodeGen/AArch64/cpu-supports-target.c (+16-10) 
- (modified) clang/test/CodeGen/AArch64/fmv-detection.c (+54-48) 
- (modified) clang/test/CodeGen/AArch64/fmv-explicit-priority.c (+22-16) 
- (modified) clang/test/CodeGen/AArch64/fmv-mix-explicit-implicit-default.c 
(+34-22) 
- (modified) clang/test/CodeGen/AArch64/fmv-resolver-emission.c (+34-28) 
- (modified) clang/test/CodeGen/AArch64/fmv-unreachable-version.c (+8-8) 
- (modified) clang/test/CodeGen/AArch64/mixed-target-attributes.c (+30-18) 
- (modified) clang/test/CodeGen/AArch64/targetattr.c (+25-22) 
- (modified) clang/test/CodeGen/LoongArch/targetattr-la32.c (+2-2) 
- (modified) clang/test/CodeGen/LoongArch/targetattr-la64.c (+9-9) 
- (modified) clang/test/CodeGen/PowerPC/ppc64-complex-parms.c (+1-1) 
- (modified) clang/test/CodeGen/PowerPC/ppc64-complex-return.c (+1-1) 
- (modified) clang/test/CodeGen/PowerPC/ppc64-extend.c (+1-1) 
- (modified) clang/test/CodeGen/address-space-field1.c (+1-1) 
- (modified) clang/test/CodeGen/alias.c (+2-2) 
- (modified) clang/test/CodeGen/amdgpu-abi-version.c (+2-2) 
- (modified) clang/test/CodeGen/amdgpu-address-spaces.cpp (+1-1) 
- (modified) clang/test/CodeGen/amdgpu-builtin-is-invocable-subarch.c (+2-2) 
- (modified) clang/test/CodeGen/amdgpu-builtin-is-invocable.c (+3-3) 
- (modified) clang/test/CodeGen/amdgpu-builtin-processor-is-subarch.c (+3-3) 
- (modified) clang/test/CodeGen/amdgpu-builtin-processor-is.c (+3-3) 
- (modified) clang/test/CodeGen/arm64ec-hybrid-patchable.c (+6-6) 
- (modified) clang/test/CodeGen/attr-naked.c (+1-1) 
- (modified) clang/test/CodeGen/attr-target-clones-aarch64.c (+79-61) 
- (modified) clang/test/CodeGen/attr-target-clones-riscv.c (+8-8) 
- (modified) clang/test/CodeGen/attr-target-version-riscv.c (+7-7) 
- (modified) clang/test/CodeGen/attributes.c (+2-2) 
- (modified) clang/test/CodeGen/fp-floatcontrol-stack.cpp (+20-20) 
- (modified) clang/test/CodeGen/incomplete-function-type-2.c (+1-1) 
- (modified) clang/test/CodeGen/link-bitcode-file.c (+1-1) 
- (modified) clang/test/CodeGen/linux-kernel-struct-union-initializer.c (+1-1) 
- (modified) clang/test/CodeGen/linux-kernel-struct-union-initializer2.c (+1-1) 
- (modified) clang/test/CodeGen/micromips-attr.c (+2-2) 
- (modified) clang/test/CodeGen/mips16-attr.c (+2-2) 
- (modified) clang/test/CodeGen/mrtd.c (+1-1) 
- (modified) clang/test/CodeGen/multi-aix-builtin-cpu-supports.c (+1-1) 
- (modified) clang/test/CodeGen/nofpclass.c (+33-33) 
- (modified) clang/test/CodeGen/nsan-basic.c (+1-1) 
- (modified) clang/test/CodeGen/nvptx_attributes.c (+2-2) 
- (modified) clang/test/CodeGen/pragma-weak.c (+2-2) 
- (modified) clang/test/CodeGen/sanitize-numerical-stability-attr.cpp (+3-3) 
- (modified) clang/test/CodeGen/sanitize-thread-attr.cpp (+1-1) 
- (modified) clang/test/CodeGen/sanitize-type-attr.cpp (+1-1) 
- (modified) clang/test/CodeGen/sanitize-type-globals.cpp (+1-1) 
- (modified) clang/test/CodeGen/stackrealign-main.c (+2-2) 
- (modified) clang/test/CodeGen/unwind-attr.c (+3-3) 
- (modified) clang/test/CodeGenCUDA/amdgpu-kernel-attrs.cu (+1-1) 
- (modified) clang/test/CodeGenCUDA/convergent.cu (+3-3) 
- (modified) clang/test/CodeGenCXX/apple-kext.cpp (+1-1) 
- (modified) clang/test/CodeGenCXX/attr-target-clones-riscv.cpp (+7-7) 
- (modified) clang/test/CodeGenCXX/attr-target-version-riscv.cpp (+6-6) 
- (modified) clang/test/CodeGenCXX/cxx11-exception-spec.cpp (+1-1) 
- (modified) clang/test/CodeGenCXX/cxx11-noreturn.cpp (+1-1) 
- (modified) clang/test/CodeGenCXX/derived-to-base.cpp (+1-1) 
- (modified) clang/test/CodeGenCXX/dynamic-cast-address-space.cpp (+2-2) 
- (modified) clang/test/CodeGenCXX/main-norecurse.cpp (+1-1) 
- (modified) clang/test/CodeGenCXX/merge-functions.cpp (+5-1) 
- (modified) clang/test/CodeGenCXX/microsoft-abi-array-cookies.cpp (+1-1) 
- (modified) clang/test/CodeGenCXX/no-exceptions.cpp (+1-1) 
- (modified) clang/test/CodeGenCXX/noinline-template.cpp (+1-1) 
- (modified) clang/test/CodeGenCXX/optnone-and-attributes.cpp (+2-2) 
- (modified) clang/test/CodeGenCXX/optnone-def-decl.cpp (+1-1) 
- (modified) clang/test/CodeGenCXX/pr58798.cpp (+10-10) 
- (modified) clang/test/CodeGenCXX/reference-cast.cpp (+1-1) 
- (modified) clang/test/CodeGenCXX/threadsafe-statics.cpp (+2-2) 
- (modified) clang/test/CodeGenCXX/thunks.cpp (+1-1) 
- (modified) clang/test/CodeGenCXX/virtual-base-cast.cpp (+1-1) 
- (modified) clang/test/CodeGenHIP/default-attributes.hip (+4-4) 
- (modified) clang/test/CodeGenHIP/hip_weak_alias.cpp (+2-2) 
- (modified) clang/test/CodeGenObjC/gnu-exceptions.m (+1-1) 
- (modified) clang/test/CodeGenObjCXX/lambda-expressions.mm (+2-2) 
- (modified) clang/test/CodeGenOpenCL/amdgpu-enqueue-kernel.cl (+14-14) 
- (modified) clang/test/CodeGenOpenCL/cl20-device-side-enqueue-attributes.cl 
(+10-10) 
- (modified) clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl (+2-2) 
- (modified) clang/test/CodeGenOpenCL/opencl-kernel-call.cl (+56-56) 
- (modified) clang/test/CodeGenSYCL/function-attrs.cpp (+6-5) 
- (modified) clang/test/CodeGenSYCL/kernel-caller-entry-point.cpp (+16-16) 
- (modified) clang/test/CodeGenSYCL/sycl-kernel-entry-point-exceptions.cpp 
(+4-4) 
- (modified) clang/test/Driver/darwin-iphone-defaults.m (+1-1) 
- (modified) clang/test/Modules/aarch64-sme-keywords.cppm (+1-1) 
- (modified) clang/test/OpenMP/amdgcn-attributes.cpp (+4-4) 
- (modified) clang/test/OpenMP/amdgcn_target_global_constructor.cpp (+1-1) 
- (modified) clang/test/OpenMP/amdgcn_weak_alias.c (+2-2) 
- (modified) clang/test/OpenMP/amdgcn_weak_alias.cpp (+2-2) 
- (modified) clang/test/OpenMP/irbuilder_safelen.cpp (+2-2) 
- (modified) clang/test/OpenMP/irbuilder_safelen_order_concurrent.cpp (+2-2) 
- (modified) clang/test/OpenMP/irbuilder_simd_aligned.cpp (+2-2) 
- (modified) clang/test/OpenMP/irbuilder_simdlen.cpp (+2-2) 
- (modified) clang/test/OpenMP/irbuilder_simdlen_safelen.cpp (+2-2) 
- (modified) clang/test/OpenMP/nvptx_weak_alias.c (+1-1) 
- (modified) clang/test/PCH/objc_container.m (+1-1) 
- (modified) 
clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected
 (+1-1) 
- (modified) 
clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.generated.all.expected
 (+3-3) 
- (modified) 
clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.no-generated.all.expected
 (+3-3) 


``````````diff
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp 
b/clang/lib/CodeGen/CodeGenModule.cpp
index 435f67542268a..52a33e4be625d 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -3186,6 +3186,11 @@ void 
CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
     // OptimizeNone implies noinline; we should not be inlining such functions.
     B.addAttribute(llvm::Attribute::NoInline);
 
+    // OptimizeNone implies noipa; interprocedural analysis leads to
+    // interprocedural optimization, which can often look equivalent to 
inlining
+    // or other similar behavior that's undesirable.
+    B.addAttribute(llvm::Attribute::NoIPA);
+
     // We still need to handle naked functions even though optnone subsumes
     // much of their semantics.
     if (D->hasAttr<NakedAttr>())
diff --git a/clang/test/CXX/special/class.dtor/p3-0x.cpp 
b/clang/test/CXX/special/class.dtor/p3-0x.cpp
index 857bdca557fdc..b60b1b895a88f 100644
--- a/clang/test/CXX/special/class.dtor/p3-0x.cpp
+++ b/clang/test/CXX/special/class.dtor/p3-0x.cpp
@@ -176,4 +176,4 @@ struct TVC : VX
 template <typename T>
 TVC<T>::~TVC() {}
 
-// CHECK: attributes [[ATTRGRP]] = { mustprogress noinline nounwind{{.*}} }
+// CHECK: attributes [[ATTRGRP]] = { mustprogress noipa noinline 
nounwind{{.*}} }
diff --git a/clang/test/CodeGen/2008-04-08-NoExceptions.c 
b/clang/test/CodeGen/2008-04-08-NoExceptions.c
index 9388efb825a10..3a936aa1cc31d 100644
--- a/clang/test/CodeGen/2008-04-08-NoExceptions.c
+++ b/clang/test/CodeGen/2008-04-08-NoExceptions.c
@@ -9,4 +9,4 @@ void g(void) {
 
 // CHECK-NOT: declare void @f() [[NUW]]
 
-// CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} }
+// CHECK: attributes [[NUW]] = { noipa noinline nounwind{{.*}} }
diff --git a/clang/test/CodeGen/AArch64/cpu-supports-target.c 
b/clang/test/CodeGen/AArch64/cpu-supports-target.c
index 1cd86210095b4..b27ec31713f33 100644
--- a/clang/test/CodeGen/AArch64/cpu-supports-target.c
+++ b/clang/test/CodeGen/AArch64/cpu-supports-target.c
@@ -4,7 +4,7 @@
 //.
 // CHECK: @__aarch64_cpu_features = external dso_local global { i64 }
 //.
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define dso_local i32 @check_all_features(
 // CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
 // CHECK-NEXT:  [[ENTRY:.*:]]
@@ -152,7 +152,7 @@ int check_all_features() {
     return 0;
 }
 
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define dso_local i32 @neon_code(
 // CHECK-SAME: ) #[[ATTR1:[0-9]+]] {
 // CHECK-NEXT:  [[ENTRY:.*:]]
@@ -160,7 +160,7 @@ int check_all_features() {
 //
 int __attribute__((target("simd"))) neon_code() { return 1; }
 
-// CHECK: Function Attrs: noinline nounwind optnone vscale_range(1,16)
+// CHECK: Function Attrs: noipa noinline nounwind optnone vscale_range(1,16)
 // CHECK-LABEL: define dso_local i32 @sve_code(
 // CHECK-SAME: ) #[[ATTR2:[0-9]+]] {
 // CHECK-NEXT:  [[ENTRY:.*:]]
@@ -168,7 +168,7 @@ int __attribute__((target("simd"))) neon_code() { return 1; 
}
 //
 int __attribute__((target("sve"))) sve_code() { return 2; }
 
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define dso_local i32 @code(
 // CHECK-SAME: ) #[[ATTR0]] {
 // CHECK-NEXT:  [[ENTRY:.*:]]
@@ -176,7 +176,7 @@ int __attribute__((target("sve"))) sve_code() { return 2; }
 //
 int code() { return 3; }
 
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define dso_local i32 @test_versions(
 // CHECK-SAME: ) #[[ATTR0]] {
 // CHECK-NEXT:  [[ENTRY:.*:]]
@@ -217,7 +217,7 @@ int test_versions() {
     return code();
 }
 
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define dso_local i32 @test_long(
 // CHECK-SAME: ) #[[ATTR0]] {
 // CHECK-NEXT:  [[ENTRY:.*:]]
@@ -233,9 +233,15 @@ int test_long(void) {
 }
 
 //.
-// CHECK: attributes #[[ATTR0]] = { noinline nounwind optnone 
"no-trapping-math"="true" "stack-protector-buffer-size"="8" }
-// CHECK: attributes #[[ATTR1]] = { noinline nounwind optnone 
"no-trapping-math"="true" "stack-protector-buffer-size"="8" 
"target-features"="+fp-armv8,+neon" }
-// CHECK: attributes #[[ATTR2]] = { noinline nounwind optnone 
vscale_range(1,16) "no-trapping-math"="true" "stack-protector-buffer-size"="8" 
"target-features"="+fp-armv8,+fullfp16,+sve" }
+// CHECK: attributes #[[ATTR0]] = { noipa noinline nounwind optnone 
"no-trapping-math"="true" "stack-protector-buffer-size"="8" }
+// CHECK: attributes #[[ATTR1]] = { noipa noinline nounwind optnone 
"no-trapping-math"="true" "stack-protector-buffer-size"="8" 
"target-features"="+fp-armv8,+neon" }
+// CHECK: attributes #[[ATTR2]] = { noipa noinline nounwind optnone 
vscale_range(1,16) "no-trapping-math"="true" "stack-protector-buffer-size"="8" 
"target-features"="+fp-armv8,+fullfp16,+sve" }
 //.
-// CHECK: [[META0:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"}
+// CHECK: [[META0:![0-9]+]] = !{i32 1, !"ptrauth-elf-got", i32 0}
+// CHECK: [[META1:![0-9]+]] = !{i32 1, !"ptrauth-init-fini", i32 0}
+// CHECK: [[META2:![0-9]+]] = !{i32 1, 
!"ptrauth-init-fini-address-discrimination", i32 0}
+// CHECK: [[META3:![0-9]+]] = !{i32 1, !"ptrauth-sign-personality", i32 0}
+// CHECK: [[META4:![0-9]+]] = !{i32 1, !"aarch64-elf-pauthabi-platform", i32 
268435458}
+// CHECK: [[META5:![0-9]+]] = !{i32 1, !"aarch64-elf-pauthabi-version", i32 0}
+// CHECK: [[META6:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"}
 //.
diff --git a/clang/test/CodeGen/AArch64/fmv-detection.c 
b/clang/test/CodeGen/AArch64/fmv-detection.c
index 344bde0af8c01..53a68fc9165a0 100644
--- a/clang/test/CodeGen/AArch64/fmv-detection.c
+++ b/clang/test/CodeGen/AArch64/fmv-detection.c
@@ -107,329 +107,329 @@ int caller() {
 // CHECK: @__aarch64_cpu_features = external dso_local global { i64 }
 // CHECK: @fmv = weak_odr ifunc i32 (), ptr @fmv.resolver
 //.
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Maes
 // CHECK-SAME: () #[[ATTR0:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mbf16
 // CHECK-SAME: () #[[ATTR1:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mbti
 // CHECK-SAME: () #[[ATTR2:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mcrc
 // CHECK-SAME: () #[[ATTR3:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mcssc
 // CHECK-SAME: () #[[ATTR4:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mdit
 // CHECK-SAME: () #[[ATTR5:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mdotprod
 // CHECK-SAME: () #[[ATTR6:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mdpb
 // CHECK-SAME: () #[[ATTR7:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mdpb2
 // CHECK-SAME: () #[[ATTR8:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone vscale_range(1,16)
+// CHECK: Function Attrs: noipa noinline nounwind optnone vscale_range(1,16)
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mf32mm
 // CHECK-SAME: () #[[ATTR9:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone vscale_range(1,16)
+// CHECK: Function Attrs: noipa noinline nounwind optnone vscale_range(1,16)
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mf64mm
 // CHECK-SAME: () #[[ATTR10:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mfcma
 // CHECK-SAME: () #[[ATTR11:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mflagm
 // CHECK-SAME: () #[[ATTR12:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mflagm2
 // CHECK-SAME: () #[[ATTR13:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mfp
 // CHECK-SAME: () #[[ATTR14:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mfp16
 // CHECK-SAME: () #[[ATTR15:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mfp16fml
 // CHECK-SAME: () #[[ATTR16:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mfrintts
 // CHECK-SAME: () #[[ATTR17:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mi8mm
 // CHECK-SAME: () #[[ATTR18:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mjscvt
 // CHECK-SAME: () #[[ATTR19:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mlse
 // CHECK-SAME: () #[[ATTR20:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mmemtag
 // CHECK-SAME: () #[[ATTR21:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mmops
 // CHECK-SAME: () #[[ATTR22:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mrcpc
 // CHECK-SAME: () #[[ATTR23:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mrcpc2
 // CHECK-SAME: () #[[ATTR24:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mrcpc3
 // CHECK-SAME: () #[[ATTR25:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mrdm
 // CHECK-SAME: () #[[ATTR26:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mrng
 // CHECK-SAME: () #[[ATTR27:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Msb
 // CHECK-SAME: () #[[ATTR28:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Msha2
 // CHECK-SAME: () #[[ATTR29:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Msha3
 // CHECK-SAME: () #[[ATTR30:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Msimd
 // CHECK-SAME: () #[[ATTR31:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Msm4
 // CHECK-SAME: () #[[ATTR32:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Msme
 // CHECK-SAME: () #[[ATTR33:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Msme-f64f64
 // CHECK-SAME: () #[[ATTR34:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Msme-i16i64
 // CHECK-SAME: () #[[ATTR35:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Msme2
 // CHECK-SAME: () #[[ATTR36:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mssbs
 // CHECK-SAME: () #[[ATTR37:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone vscale_range(1,16)
+// CHECK: Function Attrs: noipa noinline nounwind optnone vscale_range(1,16)
 // CHECK-LABEL: define {{[^@]+}}@fmv._Msve
 // CHECK-SAME: () #[[ATTR38:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone vscale_range(1,16)
+// CHECK: Function Attrs: noipa noinline nounwind optnone vscale_range(1,16)
 // CHECK-LABEL: define {{[^@]+}}@fmv._Msve2
 // CHECK-SAME: () #[[ATTR39:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone vscale_range(1,16)
+// CHECK: Function Attrs: noipa noinline nounwind optnone vscale_range(1,16)
 // CHECK-LABEL: define {{[^@]+}}@fmv._Msve2-aes
 // CHECK-SAME: () #[[ATTR40:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone vscale_range(1,16)
+// CHECK: Function Attrs: noipa noinline nounwind optnone vscale_range(1,16)
 // CHECK-LABEL: define {{[^@]+}}@fmv._Msve2-bitperm
 // CHECK-SAME: () #[[ATTR41:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone vscale_range(1,16)
+// CHECK: Function Attrs: noipa noinline nounwind optnone vscale_range(1,16)
 // CHECK-LABEL: define {{[^@]+}}@fmv._Msve2-sha3
 // CHECK-SAME: () #[[ATTR42:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone vscale_range(1,16)
+// CHECK: Function Attrs: noipa noinline nounwind optnone vscale_range(1,16)
 // CHECK-LABEL: define {{[^@]+}}@fmv._Msve2-sm4
 // CHECK-SAME: () #[[ATTR43:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv._Mwfxt
 // CHECK-SAME: () #[[ATTR44:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@fmv.default
 // CHECK-SAME: () #[[ATTR45:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 0
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@caller
 // CHECK-SAME: () #[[ATTR46:[0-9]+]] {
 // CHECK-NEXT:  entry:
@@ -813,5 +813,11 @@ int caller() {
 // CHECK-NEXT:    ret ptr @fmv.default
 //
 //.
-// CHECK: [[META0:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"}
+// CHECK: [[META0:![0-9]+]] = !{i32 1, !"ptrauth-elf-got", i32 0}
+// CHECK: [[META1:![0-9]+]] = !{i32 1, !"ptrauth-init-fini", i32 0}
+// CHECK: [[META2:![0-9]+]] = !{i32 1, 
!"ptrauth-init-fini-address-discrimination", i32 0}
+// CHECK: [[META3:![0-9]+]] = !{i32 1, !"ptrauth-sign-personality", i32 0}
+// CHECK: [[META4:![0-9]+]] = !{i32 1, !"aarch64-elf-pauthabi-platform", i32 
268435458}
+// CHECK: [[META5:![0-9]+]] = !{i32 1, !"aarch64-elf-pauthabi-version", i32 0}
+// CHECK: [[META6:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"}
 //.
diff --git a/clang/test/CodeGen/AArch64/fmv-explicit-priority.c 
b/clang/test/CodeGen/AArch64/fmv-explicit-priority.c
index ca84db87074fe..9e578808cccbc 100644
--- a/clang/test/CodeGen/AArch64/fmv-explicit-priority.c
+++ b/clang/test/CodeGen/AArch64/fmv-explicit-priority.c
@@ -12,56 +12,56 @@ __attribute__((target_clones("sme;priority=3", 
"bti;priority=2", "mops;priority=
 // CHECK: @foo = weak_odr ifunc i32 (), ptr @foo.resolver
 // CHECK: @bar = weak_odr ifunc i32 (), ptr @bar.resolver
 //.
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@foo._Mlse
 // CHECK-SAME: () #[[ATTR0:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 1
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone
+// CHECK: Function Attrs: noipa noinline nounwind optnone
 // CHECK-LABEL: define {{[^@]+}}@foo._Maes
 // CHECK-SAME: () #[[ATTR1:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 2
 //
 //
-// CHECK: Function Attrs: noinline nounwind optnone vscale_range(1,16)
+// CHECK: Function Attrs: noipa noinline nounwind optnone vscale_range(1,16)
 // CHECK-LABEL: define {{[^@]+}}@foo._Msve
 // CHECK-SAME: () #[[ATTR2:[0-9]+]] {
 // CHECK-NEXT:  entry:
 /...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/218782
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to