<html>
    <head>
      <base href="http://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Power i32/i64 atomic acquire load lowers to lwsync, not isync"
   href="http://bugs.llvm.org/show_bug.cgi?id=32392">32392</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Power i32/i64 atomic acquire load lowers to lwsync, not isync
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: PowerPC
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>timshen91@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>GCC lowers acquire load of i32/i64 to isync, but llvm lowers them to lwsync.

Here's the explanation:
<a href="http://www.rdrop.com/~paulmck/scalability/paper/N2745r.2011.03.04a.html">http://www.rdrop.com/~paulmck/scalability/paper/N2745r.2011.03.04a.html</a>

A casually written benchmark also shows that isync approach is faster:

GCC:
Benchmark                      Time(ns)        CPU(ns)     Iterations
---------------------------------------------------------------------
BM_Acquire32/threads:1                2.74           2.74   256555796  
BM_Acquire32/threads:2                1.40           2.80   228185266  
BM_Acquire32/threads:4                1.25           4.98   124786836  
BM_Acquire32/threads:176              0.240          8.17    78115312  
BM_Acquire64/threads:1                5.42           5.41   166593868  
BM_Acquire64/threads:2                2.47           4.07   199450866  
BM_Acquire64/threads:4                1.17           3.22   182357912  
BM_Acquire64/threads:176              0.209          6.76    94368384  

LLVM:
Benchmark                      Time(ns)        CPU(ns)     Iterations
---------------------------------------------------------------------
BM_Acquire32/threads:1                8.45           8.44    70487873  
BM_Acquire32/threads:2                2.75           5.49    93091058  
BM_Acquire32/threads:4                5.56          22.2     31810768  
BM_Acquire32/threads:176              1.14          37.4     17600000  
BM_Acquire64/threads:1                6.71           6.71   100000000  
BM_Acquire64/threads:2                4.01           8.00    63776730  
BM_Acquire64/threads:4                5.57          22.2     31363992  
BM_Acquire64/threads:176              1.41          36.9     17600000</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>