[llvm-bugs] [Bug 25199] New: [BranchFolding][AArch64] AArch64LoadStoreOpt uses MMOs which are dropped during tail merge

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 15 12:02:06 PDT 2015


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

            Bug ID: 25199
           Summary: [BranchFolding][AArch64] AArch64LoadStoreOpt uses MMOs
                    which are dropped during tail merge
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedbugs at nondot.org
          Reporter: mcrosier at codeaurora.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

In r231799, MMOs were removed during tail merge to preserve dependencies.

>From the commit message:
"A more robust solution would be to add multiple MMOs from the duplicate MIs to
the new MI. Currently ScheduleDAGInstrs.cpp ignores all MMOs on instructions
with multiple MMOs, so this solution is equivalent for the time being."

The final comment isn't quite true.  This change doesn't effect
ScheduleDAGInstrs, but it does prevent the load/store optimization pass from
generating load/store pairs.  Because the MMOs are dropped the pass
conservatively assumes the memory instructions are volatile.

>From MachineInstr::hasOrderedMemoryRef()

  // Otherwise, if the instruction has no memory reference information,
  // conservatively assume it wasn't preserved.
  if (memoperands_empty())
    return true;

This check causes the pass to bailout.

-- 
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/20151015/fc9dacbb/attachment.html>


More information about the llvm-bugs mailing list