summaryrefslogtreecommitdiffstats
path: root/llvm/test/Instrumentation/InstrProfiling
diff options
context:
space:
mode:
authorMarcin Koscielnicki <koriakin@0x04.net>2016-11-21 11:57:19 +0000
committerMarcin Koscielnicki <koriakin@0x04.net>2016-11-21 11:57:19 +0000
commit1c2bd1e9f34eab5e79dc74bf4959859fa72ec7f6 (patch)
tree46ce940585d8dfff19041df4f632d16b9f5bd64a /llvm/test/Instrumentation/InstrProfiling
parent5ae2c526db3f5a4d3c8e0c07cbcac49a3bb9fd0a (diff)
downloadbcm5719-llvm-1c2bd1e9f34eab5e79dc74bf4959859fa72ec7f6.tar.gz
bcm5719-llvm-1c2bd1e9f34eab5e79dc74bf4959859fa72ec7f6.zip
[InstrProfiling] Mark __llvm_profile_instrument_target last parameter as i32 zeroext if appropriate.
On some architectures (s390x, ppc64, sparc64, mips), C-level int is passed as i32 signext instead of plain i32. Likewise, unsigned int may be passed as i32, i32 signext, or i32 zeroext depending on the platform. Mark __llvm_profile_instrument_target properly (its last parameter is unsigned int). This (together with the clang change) makes compiler-rt profile testsuite pass on s390x. Differential Revision: http://reviews.llvm.org/D21736 llvm-svn: 287534
Diffstat (limited to 'llvm/test/Instrumentation/InstrProfiling')
-rw-r--r--llvm/test/Instrumentation/InstrProfiling/icall.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/Instrumentation/InstrProfiling/icall.ll b/llvm/test/Instrumentation/InstrProfiling/icall.ll
index 3f6b18125b5..529ad9ce12f 100644
--- a/llvm/test/Instrumentation/InstrProfiling/icall.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/icall.ll
@@ -2,6 +2,13 @@
; RUN: opt < %s -mtriple=x86_64-apple-macosx10.10.0 -vp-static-alloc=true -instrprof -S | FileCheck %s --check-prefix=STATIC
; RUN: opt < %s -mtriple=x86_64-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC
+; RUN: opt < %s -mtriple=powerpc-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC
+; RUN: opt < %s -mtriple=sparc-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC
+; RUN: opt < %s -mtriple=s390x-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC-EXT
+; RUN: opt < %s -mtriple=powerpc64-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC-EXT
+; RUN: opt < %s -mtriple=sparc64-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC-EXT
+; RUN: opt < %s -mtriple=mips-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC-SEXT
+; RUN: opt < %s -mtriple=mips64-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC-SEXT
; RUN: opt < %s -mtriple=x86_64-apple-macosx10.10.0 -vp-static-alloc=false -instrprof -S | FileCheck %s --check-prefix=DYN
; RUN: opt < %s -mtriple=x86_64-unknown-linux -instrprof -vp-static-alloc=false -S | FileCheck %s --check-prefix=DYN
@@ -29,3 +36,11 @@ attributes #0 = { nounwind }
; DYN-NOT: @__profvp_foo
; DYN-NOT: @__llvm_prf_vnodes
+
+; STATIC: call void @__llvm_profile_instrument_target(i64 %3, i8* bitcast ({ i64, i64, i64*, i8*, i8*, i32, [1 x i16] }* @__profd_foo to i8*), i32 0)
+; STATIC-EXT: call void @__llvm_profile_instrument_target(i64 %3, i8* bitcast ({ i64, i64, i64*, i8*, i8*, i32, [1 x i16] }* @__profd_foo to i8*), i32 zeroext 0)
+; STATIC-SEXT: call void @__llvm_profile_instrument_target(i64 %3, i8* bitcast ({ i64, i64, i64*, i8*, i8*, i32, [1 x i16] }* @__profd_foo to i8*), i32 signext 0)
+
+; STATIC: declare void @__llvm_profile_instrument_target(i64, i8*, i32)
+; STATIC-EXT: declare void @__llvm_profile_instrument_target(i64, i8*, i32 zeroext)
+; STATIC-SEXT: declare void @__llvm_profile_instrument_target(i64, i8*, i32 signext)
OpenPOWER on IntegriCloud