<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">+SDValue XCoreTargetLowering::<br>
      +LowerATOMICLOAD(SDValue Op, SelectionDAG &DAG) const {<br>
      <br>
      Should be called LowerATOMIC_LOAD to match the opcode it is
      lowering<br>
      <br>
      +  if (N->getMemoryVT() == MVT::i32) {<br>
      +    assert(N->getAlignment() >= 4 && "atomic load
      must be aligned");<br>
      <br>
      Should this use llvm_report_error instead? The same applies to the
      other assertions about alignment.<br>
      <br>
      +    return DAG.getLoad(getPointerTy(), SDLoc(Op),
      N->getChain(),<br>
      +                       N->getBasePtr(),
      N->getPointerInfo(),<br>
      +                       N->isVolatile(), N->isNonTemporal(),<br>
      +                       N->isInvariant(), 4);<br>
      <br>
      This should preserve the alignment and the TBAAInfo. The same goes
      for the other loads and stores you create.<br>
      <br>
      +SDValue XCoreTargetLowering::<br>
      +LowerATOMICSTORE(SDValue Op, SelectionDAG &DAG) const {<br>
      <br>
      Should be called LowerATOMIC_STORE to match the opcode it is
      lowering<br>
      <br>
      Looks good otherwise.<br>
      <br>
      On 04/12/13 16:07, Robert Lytton wrote:<br>
    </div>
    <blockquote
cite="mid:E55040AE4CA5DE4A84D2754CE295AF30014D92AD@EXMAILBOX2.vo.spidergroup.co.uk"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
      <div style="direction: ltr;font-family: Tahoma;color:
        #000000;font-size: 10pt;">Hi,<br>
        <br>
        Here is a patch for:<br>
            XCore target: Lower ATOMIC_LOAD & ATOMIC_STORE<br>
        <br>
        Robert<br>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Richard Osborne | XMOS
<a class="moz-txt-link-freetext" href="http://www.xmos.com">http://www.xmos.com</a>
</pre>
  </body>
</html>