[llvm-bugs] [Bug 34212] New: r4 writes inserted overwriting a register that is supposed to be preserved across function calls
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Wed Aug 16 11:05:48 PDT 2017
    
    
  
https://bugs.llvm.org/show_bug.cgi?id=34212
            Bug ID: 34212
           Summary: r4 writes inserted overwriting a register that is
                    supposed to be preserved across function calls
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: phosek at chromium.org
                CC: llvm-bugs at lists.llvm.org
This appears to be a recent regression. When building
https://skia.googlesource.com/skia/+/master/src/core/SkPathRef.cpp#51 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.
-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170816/d1779ff3/attachment.html>
    
    
More information about the llvm-bugs
mailing list