[PATCH] D26212: IRMover: Avoid accidentally mapping types from the destination module (PR30799)

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 1 14:45:02 PDT 2016


hans added inline comments.


================
Comment at: test/LTO/X86/type-mapping-bug.ll:3
+; RUN: llvm-as -o %t.src.bc %S/Inputs/type-mapping-src.ll
+; RUN: llvm-lto %t.dst.bc %t.src.bc -o=/dev/null
+
----------------
pcc wrote:
> Would it be possible to write this test with `llvm-link` instead of `llvm-lto`?
Sadly, I wasn't able to reproduce this with llvm-link, only with llvm-lto.

Some code path must be different. While I think it should be possible to trigger the same problem there, I couldn't figure out how to do it.


================
Comment at: test/LTO/X86/type-mapping-bug.ll:23
+; getting a mapping from %DstType, which has previously used as
+; a destination type.
+%Tricky = type opaque
----------------
inglorion wrote:
> This explains what happens without the above change to IRMover.cpp, but it doesn't explain what happens after you make that change and why that behavior is correct. Could you add that information here? Other than that, looks good - thanks for fixing this!
Thanks, updating the comment.


https://reviews.llvm.org/D26212





More information about the llvm-commits mailing list