[LLVMbugs] [Bug 23339] New: Continuous memory fences fail lower into one

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Apr 24 11:26:45 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23339

            Bug ID: 23339
           Summary: Continuous memory fences fail lower into one
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedbugs at nondot.org
          Reporter: rwindz0 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

We have file test.ll which contains:

define i32 @t1() {
entry:
  fence seq_cst
  fence seq_cst
  fence seq_cst
  fence seq_cst
  ret i32 0
}

When dealing with arm taret, the output looks like sane:
$llc -O0 -mtriple arm-linux-gnueabi -mcpu cortex-a53 test.ll -o -

    .type    t1,%function
t1:                                     @ @t1
    .fnstart
@ BB#0:                                 @ %entry
    movw    r0, #0
    dmb    ish
    bx    lr
.Lfunc_end0:
    .size    t1, .Lfunc_end0-t1
    .fnend

But with arm64 target:
$llc -O0 -mtriple arm64-linux-gnueabi -mcpu cortex-a53 test.ll -o -

t1:                                     // @t1
    .cfi_startproc
// BB#0:                                // %entry
    mov     w8, wzr
    dmb    ish
    dmb    ish
    dmb    ish
    dmb    ish
    mov     w0, w8
    ret
.Lfunc_end0:
    .size    t1, .Lfunc_end0-t1
    .cfi_endproc

We have multiple "dmb ish" instructions here.

-- 
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/20150424/bf8a8391/attachment.html>


More information about the llvm-bugs mailing list