[llvm] f5505a2 - [InstrProfiling] Add AIX triple to more tests

Jinsong Ji via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 1 20:03:21 PDT 2021


Author: Jinsong Ji
Date: 2021-09-02T03:03:00Z
New Revision: f5505a2ca631b39d75a71c8ad7c0770d9c106fc4

URL: https://github.com/llvm/llvm-project/commit/f5505a2ca631b39d75a71c8ad7c0770d9c106fc4
DIFF: https://github.com/llvm/llvm-project/commit/f5505a2ca631b39d75a71c8ad7c0770d9c106fc4.diff

LOG: [InstrProfiling] Add AIX triple to more tests

Following patch of https://reviews.llvm.org/D108490.
Add AIX triples to tests in /Instrumentation/InstrProfiling/ to make
sure we can catch regressions earlier.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D109089

Added: 
    

Modified: 
    llvm/test/Instrumentation/InstrProfiling/no-counters.ll
    llvm/test/Instrumentation/InstrProfiling/profiling.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Instrumentation/InstrProfiling/no-counters.ll b/llvm/test/Instrumentation/InstrProfiling/no-counters.ll
index 4c1905b2eaa06..ab103ae4b8d3b 100644
--- a/llvm/test/Instrumentation/InstrProfiling/no-counters.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/no-counters.ll
@@ -3,6 +3,7 @@
 ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.10.0 -instrprof -S | FileCheck %s -check-prefixes=ALL,DARWIN
 ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.10.0 -passes=instrprof -S | FileCheck %s -check-prefixes=ALL,DARWIN
 ; RUN: opt < %s -mtriple=x86_64-linux-unknown -passes=instrprof -S | FileCheck %s -check-prefixes=ALL,LINUX
+; RUN: opt < %s -mtriple=powerpc64-ibm-aix-xcoff -passes=instrprof -S | FileCheck %s -check-prefixes=ALL,DARWIN
 ; ALL-NOT: @__profc
 ; ALL-NOT: @__profd
 ; DARWIN: @__llvm_profile_runtime

diff  --git a/llvm/test/Instrumentation/InstrProfiling/profiling.ll b/llvm/test/Instrumentation/InstrProfiling/profiling.ll
index f5c0c560bba9d..6efaf65f1eab9 100644
--- a/llvm/test/Instrumentation/InstrProfiling/profiling.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/profiling.ll
@@ -5,10 +5,12 @@
 ; RUN: opt < %s -mtriple=x86_64-unknown-linux -passes=instrprof -S | FileCheck %s --check-prefixes=ELF
 ; RUN: opt < %s -mtriple=x86_64-unknown-fuchsia -passes=instrprof -S | FileCheck %s --check-prefixes=ELF
 ; RUN: opt < %s  -mtriple=x86_64-pc-win32-coff -passes=instrprof -S | FileCheck %s --check-prefixes=COFF
+; RUN: opt < %s -mtriple=powerpc64-ibm-aix-xcoff -passes=instrprof -S | FileCheck %s --check-prefixes=XCOFF
 
 ; MACHO: @__llvm_profile_runtime = external global i32
 ; ELF_GENERIC: @__llvm_profile_runtime = external global i32
 ; ELF-NOT: @__llvm_profile_runtime = external global i32
+; XCOFF: @__llvm_profile_runtime = external global i32
 
 ; ELF: $__profc_foo = comdat nodeduplicate
 ; ELF: $__profc_foo_weak = comdat nodeduplicate
@@ -29,6 +31,9 @@
 ; COFF: @__profc_foo = private global
 ; COFF-NOT: comdat
 ; COFF: @__profd_foo = private global
+; XCOFF: @__profc_foo = private global
+; XCOFF-NOT: comdat
+; XCOFF: @__profd_foo = private global
 define void @foo() {
   call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__profn_foo, i32 0, i32 0), i64 0, i32 1, i32 0)
   ret void
@@ -40,6 +45,8 @@ define void @foo() {
 ; MACHO: @__profd_foo_weak = weak hidden global
 ; COFF: @__profc_foo_weak = weak hidden global
 ; COFF: @__profd_foo_weak = private global
+; XCOFF: @__profc_foo_weak = weak hidden global
+; XCOFF: @__profd_foo_weak = weak hidden global
 define weak void @foo_weak() {
   call void @llvm.instrprof.increment(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__profn_foo_weak, i32 0, i32 0), i64 0, i32 1, i32 0)
   ret void
@@ -51,6 +58,8 @@ define weak void @foo_weak() {
 ; MACHO: @"__profd_linkage.ll:foo_internal" = private global
 ; COFF: @"__profc_linkage.ll:foo_internal" = private global
 ; COFF: @"__profd_linkage.ll:foo_internal" = private global
+; XCOFF: @"__profc_linkage.ll:foo_internal" = private global
+; XCOFF: @"__profd_linkage.ll:foo_internal" = private global
 define internal void @foo_internal() {
   call void @llvm.instrprof.increment(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @"__profn_linkage.ll:foo_internal", i32 0, i32 0), i64 0, i32 1, i32 0)
   ret void
@@ -62,6 +71,8 @@ define internal void @foo_internal() {
 ; MACHO: @__profd_foo_inline = linkonce_odr hidden global
 ; COFF: @__profc_foo_inline = linkonce_odr hidden global{{.*}} section ".lprfc$M", align 8
 ; COFF: @__profd_foo_inline = private global{{.*}} section ".lprfd$M", align 8
+; XCOFF: @__profc_foo_inline = linkonce_odr hidden global
+; XCOFF: @__profd_foo_inline = linkonce_odr hidden global
 define linkonce_odr void @foo_inline() {
   call void @llvm.instrprof.increment(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__profn_foo_inline, i32 0, i32 0), i64 0, i32 1, i32 0)
   ret void
@@ -73,6 +84,8 @@ define linkonce_odr void @foo_inline() {
 ; MACHO: @__profd_foo_extern = linkonce_odr hidden global
 ; COFF: @__profc_foo_extern = linkonce_odr hidden global {{.*}}section ".lprfc$M", comdat, align 8
 ; COFF: @__profd_foo_extern = private global {{.*}}section ".lprfd$M", comdat($__profc_foo_extern), align 8
+; XCOFF: @__profc_foo_extern = linkonce_odr hidden global
+; XCOFF: @__profd_foo_extern = linkonce_odr hidden global
 define available_externally void @foo_extern() {
   call void @llvm.instrprof.increment(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__profn_foo_extern, i32 0, i32 0), i64 0, i32 1, i32 0)
   ret void
@@ -92,11 +105,22 @@ declare void @llvm.instrprof.increment(i8*, i64, i32, i32)
 ; COFF: define linkonce_odr hidden i32 @__llvm_profile_runtime_user() {{.*}} comdat {
 ; ELF-NOT: define linkonce_odr hidden i32 @__llvm_profile_runtime_user() {{.*}} {
 ; ELF-NOT:   %[[REG:.*]] = load i32, i32* @__llvm_profile_runtime
+; XCOFF: define linkonce_odr hidden i32 @__llvm_profile_runtime_user() {{.*}} {
+; XCOFF:   %[[REG:.*]] = load i32, i32* @__llvm_profile_runtime
+; XCOFF:   ret i32 %[[REG]]
+; XCOFF: }
 
 ; ELF_GENERIC:      define internal void @__llvm_profile_register_functions() unnamed_addr {
 ; ELF_GENERIC-NEXT:   call void @__llvm_profile_register_function(i8* bitcast (i32* @__llvm_profile_runtime to i8*))
-; ELF_GENERIC-NEXT:   call void @__llvm_profile_register_function(i8* bitcast ({ i64, i64, i64, i8*, i8*, i32, [2 x i16] }* @__profd_foo to i8*))
-; ELF_GENERIC-NEXT:   call void @__llvm_profile_register_function(i8* bitcast ({ i64, i64, i64, i8*, i8*, i32, [2 x i16] }* @__profd_foo_weak to i8*))
+; ELF_GENERIC-NEXT:   call void @__llvm_profile_register_function(i8* bitcast ({ i64, i64, i64, i8*, i8*, i32, [{{.*}} x i16] }* @__profd_foo to i8*))
+; ELF_GENERIC-NEXT:   call void @__llvm_profile_register_function(i8* bitcast ({ i64, i64, i64, i8*, i8*, i32, [{{.*}} x i16] }* @__profd_foo_weak to i8*))
 ; ELF_GENERIC:        call void @__llvm_profile_register_names_function(i8* getelementptr inbounds {{.*}} @__llvm_prf_nm
 ; ELF_GENERIC-NEXT:   ret void
 ; ELF_GENERIC-NEXT: }
+
+; XCOFF:      define internal void @__llvm_profile_register_functions() unnamed_addr {
+; XCOFF-NEXT:   call void @__llvm_profile_register_function(i8* bitcast ({ i64, i64, i64, i8*, i8*, i32, [{{.*}} x i16] }* @__profd_foo to i8*))
+; XCOFF-NEXT:   call void @__llvm_profile_register_function(i8* bitcast ({ i64, i64, i64, i8*, i8*, i32, [{{.*}} x i16] }* @__profd_foo_weak to i8*))
+; XCOFF:   call void @__llvm_profile_register_names_function(i8* getelementptr inbounds {{.*}} @__llvm_prf_nm
+; XCOFF-NEXT:   ret void
+; XCOFF-NEXT: }


        


More information about the llvm-commits mailing list