Skip to content

ARM bad code: constants materialization inside loops #1670

@llvmbot

Description

@llvmbot
Bugzilla Link 1298
Resolution DUPLICATE
Resolved on Feb 22, 2010 12:44
Version unspecified
OS All
Reporter LLVM Bugzilla Contributor

Extended Description

code generated for sieve test:

    mov r2, #​0
    ldr r1, .LCPI1_0

.LBB1_3: @​bb7
add r0, r1, r2
mov r12, #​1
strb r12, [r0, #+2]
add r2, r2, #​1
mov r0, #​255
orr r0, r0, #​31, 24 @ 7936
cmp r2, r0
bne .LBB1_3 @​bb7

can be:

    mov r2, #​0
    ldr r1, .LCPI1_0
    mov r12, #​1
    mov r0, #​255
    orr r0, r0, #​31, 24 @ 7936

.LBB1_3: @​bb7
add r3, r1, r2
strb r12, [r3, #+2]
add r2, r2, #​1
cmp r2, r0
bne .LBB1_3 @​bb7

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilladuplicateResolved as duplicate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions