https://llvm.org/bugs/show_bug.cgi?id=28942
Bug ID: 28942 Summary: MachineScheduler: clusterNeighboringMemOps can lead to unstable output Product: libraries Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: Common Code Generator Code Assignee: unassignedb...@nondot.org Reporter: gbe...@codeaurora.org CC: llvm-bugs@lists.llvm.org Classification: Unclassified The code in BaseMemOpClusterMutation::clusterNeighboringMemOps() builds a sorted list of MemOpInfos, and the ordering of this list can ultimately effect the code generated (whether loads/stores get clustered when scheduling). std::sort is used to sort the entries, which is not stable w.r.t. the order of equal elements. Unstable output could be generated for the same input if two different implementations of std::sort were used. The clustering decision for equal MemOpInfos could also be altered e.g. by the addition of extra MemOpInfos in the list before or after the equal elements. I ran into the latter case refactoring the code for AArch64InstrInfo::getMemOpBaseRegImmOfs(). -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs