<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <br>
    <div class="moz-cite-prefix">On 04/18/2016 10:33 AM, Artur Pilipenko
      via llvm-dev wrote:<br>
    </div>
    <blockquote
      cite="mid:46307199-80F3-4C2C-869B-F8F8E8591F4B@azulsystems.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <br class="">
      <div>
        <blockquote type="cite" class="">
          <div class="">On 18 Apr 2016, at 19:52, Mehdi Amini <<a
              moz-do-not-send="true" href="mailto:mehdi.amini@apple.com"
              class=""><a class="moz-txt-link-abbreviated" href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a></a>> wrote:</div>
          <br class="Apple-interchange-newline">
          <div class="">
            <div style="word-wrap: break-word; -webkit-nbsp-mode: space;
              -webkit-line-break: after-white-space;" class="">
              <br class="">
              <div class="">
                <blockquote type="cite" class="">
                  <div class="">On Apr 18, 2016, at 9:45 AM, Artur
                    Pilipenko via llvm-dev <<a moz-do-not-send="true"
                      href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>>
                    wrote:</div>
                  <br class="Apple-interchange-newline">
                  <div class="">
                    <div class="">
                      <div class="" style="word-wrap:break-word">
                        <div class="">In the current mangling scheme for
                          overloaded intrinsics we include overloaded
                          type names in the intrinsic name. For example:</div>
                        <div class=""><br class="">
                        </div>
                        <div class="">%struct.foobar = type { i32 }</div>
                        <div class="">declare <4 x
                          %struct.foobar*>
                          @llvm.masked.load.v4p0struct.foobar(<4 x
                          %struct.foobar*>*, i32, <4 x i1>,
                          <4 x %struct.foobar*>)</div>
                        <div class=""><br class="">
                        </div>
                        <div class="">Verifier checks that an overloaded
                          intrinsic name matches with its signature.</div>
                      </div>
                    </div>
                  </div>
                </blockquote>
                <div class=""><br class="">
                </div>
                <div class="">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...</div>
                <div class=""><br class="">
                </div>
                <div class="">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?</div>
              </div>
            </div>
          </div>
        </blockquote>
        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.  <br class="">
      </div>
    </blockquote>
    Relaxing the verifier here definitely sounds like the wrong
    approach.  <br>
    <br>
    Philip<br>
  </body>
</html>