OSDN Git Service

[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)
commitf14d6e165117e78a9968142608a1d6e858935441
tree92afa8beb479fcc9c3dc9323ea8e43b3606e1cf1
parentac9341f0113d0873ba0f7729dea61b7dfc822fab
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287534 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/InstrProfiling.h
lib/Transforms/Instrumentation/InstrProfiling.cpp
test/Instrumentation/InstrProfiling/icall.ll