<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:filcab@gmail.com" title="Filipe Cabecinhas <filcab@gmail.com>"> <span class="fn">Filipe Cabecinhas</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Union store codegen is silly"
   href="https://bugs.llvm.org/show_bug.cgi?id=31777">bug 31777</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Union store codegen is silly"
   href="https://bugs.llvm.org/show_bug.cgi?id=31777#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Union store codegen is silly"
   href="https://bugs.llvm.org/show_bug.cgi?id=31777">bug 31777</a>
              from <span class="vcard"><a class="email" href="mailto:filcab@gmail.com" title="Filipe Cabecinhas <filcab@gmail.com>"> <span class="fn">Filipe Cabecinhas</span></a>
</span></b>
        <pre>This has landed in r310055. New codegen for the x86_64 and armv8 cases JF
mentioned:

[llvm-cmake]% SDKROOT=$(xcrun --sdk iphoneos --show-sdk-path) ./bin/clang++
-target arm64-apple-darwin pr31777.cpp -O2 -S -fomit-frame-pointer -o - | grep
-v ...things...
__Z3fooP1U:                             ; @_Z3fooP1U
        mov     w8, #42
        str             x8, [x0]
        ret
                                        ; -- End function
__Z3barP1U:                             ; @_Z3barP1U
        mov     w8, #42
        str             x8, [x0]
        ret
                                        ; -- End function
__Z3bazP1U:                             ; @_Z3bazP1U
        mov     w8, #42
        strh            w8, [x0]
        ret
                                        ; -- End function

[llvm-cmake]% SDKROOT=$(xcrun --sdk macosx --show-sdk-path) ./bin/clang++
pr31777.cpp -O2 -S -fomit-frame-pointer -o - | grep -v ...things...
__Z3fooP1U:                             ## @_Z3fooP1U
        movq    $42, (%rdi)
        retq
                                        ## -- End function
__Z3barP1U:                             ## @_Z3barP1U
        movq    $42, (%rdi)
        retq
                                        ## -- End function
__Z3bazP1U:                             ## @_Z3bazP1U
        movw    $42, (%rdi)
        retq</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>