[InstrProfiling] Mark __llvm_profile_instrument_target last parameter as i32 zeroext...
authorMarcin Koscielnicki <koriakin@0x04.net>
Mon, 21 Nov 2016 11:57:19 +0000 (11:57 +0000)
committerMarcin Koscielnicki <koriakin@0x04.net>
Mon, 21 Nov 2016 11:57:19 +0000 (11:57 +0000)
commit1c2bd1e9f34eab5e79dc74bf4959859fa72ec7f6
tree46ce940585d8dfff19041df4f632d16b9f5bd64a
parent5ae2c526db3f5a4d3c8e0c07cbcac49a3bb9fd0a
[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
llvm/include/llvm/Transforms/InstrProfiling.h
llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
llvm/test/Instrumentation/InstrProfiling/icall.ll