[llvm-bugs] [Bug 36778] New: Use-list order not preserved for some constant values

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Mar 17 10:58:42 PDT 2018


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

            Bug ID: 36778
           Summary: Use-list order not preserved for some constant values
           Product: libraries
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Bitcode Writer
          Assignee: unassignedbugs at nondot.org
          Reporter: dpfister at mail.de
                CC: dexonsmith at apple.com, llvm-bugs at lists.llvm.org

In some cases the use-list order of a ConstantData or GlobalVariable is not
preserved during serialization.

test.ll demonstrates this for the constant i64 0:
$ verify-uselistorder test.ll
*** verify-uselistorder ***
verify bitcode
LLVM ERROR: use-list order changed

For complex projects more values are affected.
Build git-2.16.2:
$ CC=clang CFLAGS="-g -O2 -flto -fuse-ld=lld -Wl,-save-temps" ./configure \
&& make \
&& llvm-dis git.0.0.preopt.bc -o git.ll

Check for additional uselistorder directives after a round-trip:
$ llvm-as --preserve-bc-uselistorder git.ll -o - | llvm-dis
-preserve-ll-uselistorder - -o - | diff git.ll -

At first glance this seems to have something to do with the llvm.dbg.value
intrinsic function.

-- 
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/20180317/6fba453d/attachment.html>


More information about the llvm-bugs mailing list