<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 7/2/20 12:16 PM, Matt Arsenault
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:FF50A09E-7566-4F8A-93C2-AEE319367C98@gmail.com">
      
      <br class="">
      <div><br class="">
        <blockquote type="cite" class="">
          <div class="">On Jul 2, 2020, at 13:09, Hal Finkel via
            llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="" moz-do-not-send="true">llvm-dev@lists.llvm.org</a>>
            wrote:</div>
          <br class="Apple-interchange-newline">
          <div class="">
            <div class="">
              <p class="">My general feeling is this: No optimizations
                should be creating int2ptr/ptr2int. We really need to
                fix them all. They should use pointer casts and i8*
                GEPs. This has, unfortunately, been a problem for a long
                time. As Johannes says, optimizing int2ptr/ptr2int is
                very tricky. In part, becaue all dependencies, including
                implicit control dependencies, end up being part of the
                resulting aliasing based-on chain, and we have a set of
                bug reports discussing this is great detail.</p>
              <p class=""> -Hal<br class="">
              </p>
            </div>
          </div>
        </blockquote>
        We recently started introducing some more of these to represent
        no-op address space conversions in cases where pointer bits are
        reinterpreted. There’s currently a whole in the IR where there’s
        no other way to represent a pointer reinterpret. To fix this
        case, I think we need to re-allow bitcasts between pointers with
        different address spaces, but the same size.</div>
      <div><br class="">
      </div>
      <div>-Matt</div>
    </blockquote>
    <p><br>
    </p>
    <p>Makes sense to me.</p>
    <p> -Hal<br>
    </p>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
  </body>
</html>