https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64525

            Bug ID: 64525
           Summary: Duplicate instructions in both paths in conditional
                    code
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kugan at gcc dot gnu.org

Created attachment 34395
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34395&action=edit
testcase

gcc is generating the same instructions down both paths of conditional
execution. For exmaple, in the attached test case.

...
        cmp     r0, #0
        movt    r2, #:upper16:tree_code_length_0
        ldr     r0, [r2]
        movweq  r2, #:lower16:permanent_obstack
        movteq  r2, #:upper16:permanent_obstack
        movwne  r2, #:lower16:permanent_obstack
        moveq   r3, r2
        movtne  r2, #:upper16:permanent_obstack
...

Reply via email to