[llvm-dev] Assembly mimatch between windows and linux llvm.(probably caused by sort algorithm)
xuruobin via llvm-dev
llvm-dev at lists.llvm.org
Mon Aug 13 05:43:47 PDT 2018
To whom it may concern,
I'm running some testcases(A and B) in Linux LLVM(built in Ubuntu16.04) and Windows LLVM(built by Visual Studio 2015), both of which were LLVM 4.0.0 and built with same source codes, but I got different assembly files(A_Linux != A_Windows, B_Linux = B_Windows). Privacy reasons prevent me from sharing my testcases here, sorry.
I compared debug information and found the root cause in MachinePipliner.cpp that Node orders differed after sort algorithm.
There were two `std::sort` in this file and when I replaced them with 'std::stable_sort', these two assembly files became the same but other assembly files differed(A_Linux = A_Windows, B_Linux != B_Windows).
I cannot figure out the reason and could you give me some advice why this happened and what sort algorithm should I use to get exactly same assembly files?
Best regards,
Ruobin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180813/debbfa15/attachment.html>
More information about the llvm-dev
mailing list