[LLVMbugs] [Bug 9370] New: [arm] unnecessary MOVW not optimized

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 2 04:38:18 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=9370

           Summary: [arm] unnecessary MOVW not optimized
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: ARM
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: skoe at directbox.com
                CC: llvmbugs at cs.uiuc.edu


this:

  volatile store i32 -1, i32* inttoptr (i32 1342210076 to i32*), align 4, !tbaa
!0
  volatile store i32 -1, i32* inttoptr (i32 1342341148 to i32*), align 4, !tbaa
!0

is compiled and optimized to that:

    movw    r0, #32796
    mov.w    r1, #-1
    movt    r0, #20480
    str    r1, [r0]
    movw    r0, #32796    @ <= this MOVW is not needed, value is there already
    movt    r0, #20482
    str    r1, [r0]

the initial C code was:

    LPC_GPIO0->IC = ~0;
    LPC_GPIO2->IC = ~0;

It was compiled with -march=thumb -mcpu=cortex-m3 -O3

btw: Thanks for the great work, the ARM code looks quite good already!

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list