[llvm-dev] LTO and intrinsics mangling

Philip Reames via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 18 16:23:40 PDT 2016

On 04/18/2016 10:33 AM, Artur Pilipenko via llvm-dev wrote:
>> On 18 Apr 2016, at 19:52, Mehdi Amini <mehdi.amini at apple.com 
>> <mailto:mehdi.amini at apple.com>> wrote:
>>> On Apr 18, 2016, at 9:45 AM, Artur Pilipenko via llvm-dev 
>>> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>>> In the current mangling scheme for overloaded intrinsics we include 
>>> overloaded type names in the intrinsic name. For example:
>>> %struct.foobar = type { i32 }
>>> declare <4 x %struct.foobar*> @llvm.masked.load.v4p0struct.foobar(<4 
>>> x %struct.foobar*>*, i32, <4 x i1>, <4 x %struct.foobar*>)
>>> Verifier checks that an overloaded intrinsic name matches with its 
>>> signature.
>> I assume the verify does this just for internal consistency, if there 
>> is another good reason all of what I write below does not make sense 
>> probably...
>> We could make it tolerating this by trying to remove the suffix for 
>> the types and accept that the intrinsic name matches the type name 
>> without the suffix?
> There is no guarantee that two types which names differ by the suffix 
> are the same. Even in LTO case we might have unrelated types with the 
> same name in different modules (it’s basically my second example). I’m 
> reluctant to relax the verification rules because it only wraps the 
> underlying issue and potentially allows incorrect code (the case when 
> two unrelated types had the same name) to pass verification.
Relaxing the verifier here definitely sounds like the wrong approach.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160418/23f96f8c/attachment.html>

More information about the llvm-dev mailing list