<html>
    <head>
      <base href="https://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 - r4 writes inserted overwriting a register that is supposed to be preserved across function calls"
   href="https://bugs.llvm.org/show_bug.cgi?id=34212">34212</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>r4 writes inserted overwriting a register that is supposed to be preserved across function calls
          </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>release blocker
          </td>
        </tr>

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

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

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

        <tr>
          <th>Reporter</th>
          <td>phosek@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This appears to be a recent regression. When building
<a href="https://skia.googlesource.com/skia/+/master/src/core/SkPathRef.cpp#51">https://skia.googlesource.com/skia/+/master/src/core/SkPathRef.cpp#51</a> with the
latest Clang from trunk, we noticed that the compiler is inserting "movs r4,
#0" instructions that are overwriting a register that is supposed to be
preserved across function calls.

Old:

  ce:   f817 2c15       ldrb.w  r2, [r7, #-21]
  d2:   f8dd e08c       ldr.w   lr, [sp, #140]  ; 0x8c
  d6:   b2c9            uxtb    r1, r1
  d8:   e8de 3f4f       ldrexb  r3, [lr]
  dc:   450b            cmp     r3, r1
  de:   d104            bne.n   ea <void
SkOnce::operator()<SkPathRef::CreateEmpty()::$_0>(SkPathRef::CreateEmpty()::$_0&&)+0xea>

New:

  ce:   f817 2c15       ldrb.w  r2, [r7, #-21]
  d2:   f8dd e08c       ldr.w   lr, [sp, #140]  ; 0x8c
  d6:   b2c9            uxtb    r1, r1
  d8:   2400            movs    r4, #0
  da:   e8de 3f4f       ldrexb  r3, [lr]
  de:   450b            cmp     r3, r1
  e0:   d104            bne.n   ec <void
SkOnce::operator()<SkPathRef::CreateEmpty()::$_0>(SkPathRef::CreateEmpty()::$_0&&)+0xec>

There are 9 "movs r4, #0" instructions in the output generated by the trunk
version.  Each one appears in the middle of a "uxtb r1, r1" / "ldrexb r3, [lr]"
sequence as shown above.</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>