[llvm] r292654 - LowerTypeTests: Implement importing of type identifiers.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 18:08:58 PST 2017


Should be fixed by r292700.

Peter

On Fri, Jan 20, 2017 at 5:25 PM, Mike Aizatsky <aizatsky at google.com> wrote:

> Peter,
>
> Msan & Asan complain:
>
> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/2234
>
> FAIL: LLVM :: LTO/Resolution/X86/lowertypetests.ll (12663 of 19470)
> ******************** TEST 'LLVM :: LTO/Resolution/X86/lowertypetests.ll'
> FAILED ********************
> Script:
> --
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/./bin/opt -thinlto-bc -o /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm_build_msan/test/
> LTO/Resolution/X86/Output/lowertypetests.ll.tmp
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/test/LTO/Resolution/X86/lowertypetests.ll
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/./bin/llvm-lto2 -r /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm_build_msan/test/
> LTO/Resolution/X86/Output/lowertypetests.ll.tmp,f,plx -r
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/test/LTO/Resolution/X86/Output/lowertypetests.ll.tmp,foo,lx
> -r /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/test/LTO/Resolution/X86/Output/lowertypetests.ll.tmp,foo,plx
> -o /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/test/LTO/Resolution/X86/Output/lowertypetests.ll.tmp1
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/test/LTO/Resolution/X86/Output/lowertypetests.ll.tmp
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/./bin/llvm-nm /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm_build_msan/test/
> LTO/Resolution/X86/Output/lowertypetests.ll.tmp1.0 |
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/./bin/FileCheck --check-prefix=MERGED
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/test/LTO/Resolution/X86/lowertypetests.ll
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/./bin/llvm-nm /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm_build_msan/test/
> LTO/Resolution/X86/Output/lowertypetests.ll.tmp1.1 |
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/./bin/FileCheck /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/test/LTO/
> Resolution/X86/lowertypetests.ll
> --
> Exit Code: 77
>
> Command Output (stderr):
> --
> ==17627==WARNING: MemorySanitizer: use-of-uninitialized-value
>     #0 0x411a1eb in (anonymous namespace)::LowerTypeTestsModule::lower()
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/Transforms/IPO/LowerTypeTests.cpp:1352:23
>     #1 0x411c1d1 in (anonymous namespace)::LowerTypeTests::runOnModule(llvm::Module&)
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/Transforms/IPO/LowerTypeTests.cpp:368:53
>     #2 0x298f81e in runOnModule /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/IR/
> LegacyPassManager.cpp:1590:27
>     #3 0x298f81e in llvm::legacy::PassManagerImpl::run(llvm::Module&)
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/IR/
> LegacyPassManager.cpp:1693
>     #4 0x2aaa065 in runOldPMPasses /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/LTO/LTOBackend.cpp:191:10
>     #5 0x2aaa065 in (anonymous namespace)::opt(llvm::lto::Config&,
> llvm::TargetMachine*, unsigned int, llvm::Module&, bool,
> llvm::ModuleSummaryIndex&) /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/LTO/LTOBackend.cpp:197
>     #6 0x2aabd7a in llvm::lto::thinBackend(llvm::lto::Config&, unsigned
> int, std::__1::function<std::__1::unique_ptr<llvm::lto::NativeObjectStream,
> std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned
> int)>, llvm::Module&, llvm::ModuleSummaryIndex&,
> llvm::StringMap<std::__1::map<unsigned long, unsigned int,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, unsigned int> > >, llvm::MallocAllocator> const&,
> std::__1::map<unsigned long, llvm::GlobalValueSummary*,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, llvm::GlobalValueSummary*> > > const&, llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > >&) /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/LTO/LTOBackend.cpp:373:8
>     #7 0x2a9ff9b in (anonymous namespace)::InProcessThinBackend::
> runThinLTOBackendThread(std::__1::function<std::__1::unique_
> ptr<llvm::lto::NativeObjectStream, std::__1::default_delete<llvm::lto::NativeObjectStream>
> > (unsigned int)>, std::__1::function<std::__1::
> function<std::__1::unique_ptr<llvm::lto::NativeObjectStream,
> std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>
> (unsigned int, llvm::StringRef)>, unsigned int, llvm::BitcodeModule,
> llvm::ModuleSummaryIndex&, llvm::StringMap<std::__1::map<unsigned long,
> unsigned int, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, unsigned int> > >, llvm::MallocAllocator> const&,
> std::__1::unordered_set<unsigned long, std::__1::hash<unsigned long>,
> std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> >
> const&, std::__1::map<unsigned long, llvm::GlobalValue::LinkageTypes,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, llvm::GlobalValue::LinkageTypes> > > const&,
> std::__1::map<unsigned long, llvm::GlobalValueSummary*,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, llvm::GlobalValueSummary*> > > const&, llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > >&)::{lambda(std::__1::
> function<std::__1::unique_ptr<llvm::lto::NativeObjectStream,
> std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned
> int)>)#1}::operator()(std::__1::function<std::__1::unique_ptr<llvm::lto::NativeObjectStream,
> std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned
> int)>) const /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/LTO/LTO.cpp:663:14
>     #8 0x2a9e860 in runThinLTOBackendThread /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/LTO/LTO.cpp:674:14
>     #9 0x2a9e860 in operator() /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/LTO/LTO.cpp:704
>     #10 0x2a9e860 in __invoke<(lambda at /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/LTO/LTO.cpp:697:9) &,
> llvm::BitcodeModule &, llvm::ModuleSummaryIndex &, const
> llvm::StringMap<std::__1::map<unsigned long, unsigned int,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<const
> unsigned long, unsigned int> > >, llvm::MallocAllocator> &, const
> std::__1::unordered_set<unsigned long, std::__1::hash<unsigned long>,
> std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> > &,
> const std::__1::map<unsigned long, llvm::GlobalValue::LinkageTypes,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<const
> unsigned long, llvm::GlobalValue::LinkageTypes> > > &, const
> std::__1::map<unsigned long, llvm::GlobalValueSummary *,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<const
> unsigned long, llvm::GlobalValueSummary *> > > &, llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > > &> /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_msan/
> include/c++/v1/type_traits:4301
>     #11 0x2a9e860 in __apply_functor<(lambda at /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/LTO/LTO.cpp:697:9),
> std::__1::tuple<llvm::BitcodeModule, std::__1::reference_wrapper<llvm::ModuleSummaryIndex>,
> std::__1::reference_wrapper<const llvm::StringMap<std::__1::map<unsigned
> long, unsigned int, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<const unsigned long, unsigned int> >
> >, llvm::MallocAllocator> >, std::__1::reference_wrapper<const
> std::__1::unordered_set<unsigned long, std::__1::hash<unsigned long>,
> std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> > >,
> std::__1::reference_wrapper<const std::__1::map<unsigned long,
> llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<const unsigned long,
> llvm::GlobalValue::LinkageTypes> > > >, std::__1::reference_wrapper<const
> std::__1::map<unsigned long, llvm::GlobalValueSummary *,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<const
> unsigned long, llvm::GlobalValueSummary *> > > >,
> std::__1::reference_wrapper<llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > > > >, 0, 1, 2, 3, 4, 5, 6, std::__1::tuple<> >
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/libcxx_build_msan/include/c++/v1/functional:2217
>     #12 0x2a9e860 in operator()<> /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_msan/
> include/c++/v1/functional:2250
>     #13 0x2a9e860 in __invoke<std::__1::__bind<(lambda at
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/LTO/LTO.cpp:697:9), llvm::BitcodeModule &,
> std::__1::reference_wrapper<llvm::ModuleSummaryIndex>,
> std::__1::reference_wrapper<const llvm::StringMap<std::__1::map<unsigned
> long, unsigned int, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<const unsigned long, unsigned int> >
> >, llvm::MallocAllocator> >, std::__1::reference_wrapper<const
> std::__1::unordered_set<unsigned long, std::__1::hash<unsigned long>,
> std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> > >,
> std::__1::reference_wrapper<const std::__1::map<unsigned long,
> llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<const unsigned long,
> llvm::GlobalValue::LinkageTypes> > > >, std::__1::reference_wrapper<const
> std::__1::map<unsigned long, llvm::GlobalValueSummary *,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<const
> unsigned long, llvm::GlobalValueSummary *> > > >,
> std::__1::reference_wrapper<llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > > > > &> /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_msan/
> include/c++/v1/type_traits:4301
>     #14 0x2a9e860 in __call<std::__1::__bind<(lambda at
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/LTO/LTO.cpp:697:9), llvm::BitcodeModule &,
> std::__1::reference_wrapper<llvm::ModuleSummaryIndex>,
> std::__1::reference_wrapper<const llvm::StringMap<std::__1::map<unsigned
> long, unsigned int, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<const unsigned long, unsigned int> >
> >, llvm::MallocAllocator> >, std::__1::reference_wrapper<const
> std::__1::unordered_set<unsigned long, std::__1::hash<unsigned long>,
> std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> > >,
> std::__1::reference_wrapper<const std::__1::map<unsigned long,
> llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<const unsigned long,
> llvm::GlobalValue::LinkageTypes> > > >, std::__1::reference_wrapper<const
> std::__1::map<unsigned long, llvm::GlobalValueSummary *,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<const
> unsigned long, llvm::GlobalValueSummary *> > > >,
> std::__1::reference_wrapper<llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > > > > &> /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_msan/
> include/c++/v1/__functional_base:359
>     #15 0x2a9e860 in std::__1::__function::__func<std::__1::__bind<(anonymous
> namespace)::InProcessThinBackend::start(unsigned int,
> llvm::BitcodeModule, llvm::StringMap<std::__1::map<unsigned long,
> unsigned int, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, unsigned int> > >, llvm::MallocAllocator> const&,
> std::__1::unordered_set<unsigned long, std::__1::hash<unsigned long>,
> std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> >
> const&, std::__1::map<unsigned long, llvm::GlobalValue::LinkageTypes,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, llvm::GlobalValue::LinkageTypes> > > const&,
> llvm::MapVector<llvm::StringRef, llvm::BitcodeModule,
> llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef>,
> llvm::detail::DenseMapPair<llvm::StringRef, unsigned int> >,
> std::__1::vector<std::__1::pair<llvm::StringRef, llvm::BitcodeModule>,
> std::__1::allocator<std::__1::pair<llvm::StringRef, llvm::BitcodeModule>
> > > >&)::{lambda(llvm::BitcodeModule, llvm::ModuleSummaryIndex&,
> llvm::StringMap<std::__1::map<unsigned long, unsigned int,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, unsigned int> > >, llvm::MallocAllocator> const&,
> std::__1::unordered_set<unsigned long, std::__1::hash<unsigned long>,
> std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> >
> const&, std::__1::map<unsigned long, llvm::GlobalValue::LinkageTypes,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, llvm::GlobalValue::LinkageTypes> > > const&,
> std::__1::map<unsigned long, llvm::GlobalValueSummary*,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, llvm::GlobalValueSummary*> > > const&, llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > >&)#1}, llvm::BitcodeModule&,
> std::__1::reference_wrapper<llvm::ModuleSummaryIndex>,
> llvm::BitcodeModule&<llvm::StringMap<std::__1::map<unsigned long,
> unsigned int, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, unsigned int> > >, llvm::MallocAllocator> const>,
> llvm::BitcodeModule&<std::__1::unordered_set<unsigned long,
> std::__1::hash<unsigned long>, std::__1::equal_to<unsigned long>,
> std::__1::allocator<unsigned long> > const>, llvm::BitcodeModule&<std::__1::map<unsigned
> long, llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<unsigned long const,
> llvm::GlobalValue::LinkageTypes> > > const>,
> llvm::BitcodeModule&<std::__1::map<unsigned long,
> llvm::GlobalValueSummary*, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<unsigned long const,
> llvm::GlobalValueSummary*> > > const>, llvm::BitcodeModule&<llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > > > >, std::__1::allocator<llvm::
> BitcodeModule&<llvm::MapVector<llvm::StringRef, llvm::BitcodeModule,
> llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef>,
> llvm::detail::DenseMapPair<llvm::StringRef, unsigned int> >,
> std::__1::vector<std::__1::pair<llvm::StringRef, llvm::BitcodeModule>,
> std::__1::allocator<std::__1::pair<llvm::StringRef, llvm::BitcodeModule>
> > > > > >, void ()>::operator()() /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_msan/
> include/c++/v1/functional:1552
>     #16 0x2d46826 in operator() /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_msan/
> include/c++/v1/future:1997:12
>     #17 0x2d46826 in operator() /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_msan/
> include/c++/v1/future:2217
>     #18 0x2d46826 in operator() /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/Support/ThreadPool.cpp:57
>     #19 0x2d46826 in __invoke<(lambda at /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/Support/ThreadPool.cpp:32:26)>
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/libcxx_build_msan/include/c++/v1/type_traits:4301
>     #20 0x2d46826 in __thread_execute<std::__1::
> unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>
> >, (lambda at /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/Support/ThreadPool.cpp:32:26)> /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_msan/
> include/c++/v1/thread:336
>     #21 0x2d46826 in void* std::__1::__thread_proxy<std::
> __1::tuple<std::__1::unique_ptr<std::__1::__thread_struct,
> std::__1::default_delete<std::__1::__thread_struct> >,
> llvm::ThreadPool::ThreadPool(unsigned int)::$_0> >(void*)
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/libcxx_build_msan/include/c++/v1/thread:346
>     #22 0x585d8e in __msan::MsanThread::ThreadStart()
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/projects/compiler-rt/lib/msan/msan_thread.cc:77
>     #23 0x7fa53d8636b9 in start_thread (/lib/x86_64-linux-gnu/
> libpthread.so.0+0x76b9)
>     #24 0x7fa53d38382c in clone (/lib/x86_64-linux-gnu/libc.so.6+0x10682c)
>
> SUMMARY: MemorySanitizer: use-of-uninitialized-value
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/Transforms/IPO/LowerTypeTests.cpp:1352:23 in (anonymous
> namespace)::LowerTypeTestsModule::lower()
> Exiting
>
> --
>
> ********************
> Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80..
> FAIL: LLVM :: Transforms/LowerTypeTests/import.ll (17795 of 19470)
> ******************** TEST 'LLVM :: Transforms/LowerTypeTests/import.ll'
> FAILED ********************
> Script:
> --
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/./bin/opt -S -lowertypetests
> -lowertypetests-summary-action=import -lowertypetests-read-summary=/
> mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/test/Transforms/LowerTypeTests/Inputs/import.yaml <
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/test/Transforms/LowerTypeTests/import.ll |
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/./bin/FileCheck /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/test/Transforms/
> LowerTypeTests/import.ll
> --
> Exit Code: 2
>
> Command Output (stderr):
> --
> ==7942==WARNING: MemorySanitizer: use-of-uninitialized-value
>     #0 0x3edc9bb in (anonymous namespace)::LowerTypeTestsModule::lower()
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/Transforms/IPO/LowerTypeTests.cpp:1352:23
>     #1 0x3edf5f9 in runForTesting /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/Transforms/IPO/
> LowerTypeTests.cpp:1328:69
>     #2 0x3edf5f9 in (anonymous namespace)::LowerTypeTests::runOnModule(llvm::Module&)
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/Transforms/IPO/LowerTypeTests.cpp:367
>     #3 0x3c3bfde in runOnModule /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/IR/
> LegacyPassManager.cpp:1590:27
>     #4 0x3c3bfde in llvm::legacy::PassManagerImpl::run(llvm::Module&)
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/IR/
> LegacyPassManager.cpp:1693
>     #5 0x801a1f in main /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/tools/opt/opt.cpp:731:10
>     #6 0x7f1c5695982f in __libc_start_main (/lib/x86_64-linux-gnu/libc.
> so.6+0x2082f)
>     #7 0x7634d8 in _start (/mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/opt+0x7634d8)
>
> SUMMARY: MemorySanitizer: use-of-uninitialized-value
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/Transforms/IPO/LowerTypeTests.cpp:1352:23 in (anonymous
> namespace)::LowerTypeTestsModule::lower()
> Exiting
> FileCheck error: '-' is empty.
> FileCheck command line:  /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm_build_msan/./bin/FileCheck
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/test/Transforms/LowerTypeTests/import.ll
>
> --
>
> ********************
> Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80..
> FAIL: LLVM :: Transforms/LowerTypeTests/import-unsat.ll (17797 of 19470)
> ******************** TEST 'LLVM :: Transforms/LowerTypeTests/import-unsat.ll'
> FAILED ********************
> Script:
> --
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/./bin/opt -S -lowertypetests
> -lowertypetests-summary-action=import -lowertypetests-read-summary=/
> mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/test/Transforms/LowerTypeTests/Inputs/import-unsat.yaml
> -lowertypetests-write-summary=/mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm_build_msan/test/
> Transforms/LowerTypeTests/Output/import-unsat.ll.tmp <
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/test/Transforms/LowerTypeTests/import-unsat.ll |
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/./bin/FileCheck /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/test/Transforms/
> LowerTypeTests/import-unsat.ll
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/./bin/FileCheck --check-prefix=SUMMARY
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/test/Transforms/LowerTypeTests/import-unsat.ll <
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm_build_msan/test/Transforms/LowerTypeTests/
> Output/import-unsat.ll.tmp
> --
> Exit Code: 2
>
> Command Output (stderr):
> --
> ==7953==WARNING: MemorySanitizer: use-of-uninitialized-value
>     #0 0x3edc9bb in (anonymous namespace)::LowerTypeTestsModule::lower()
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/Transforms/IPO/LowerTypeTests.cpp:1352:23
>     #1 0x3edf5f9 in runForTesting /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/Transforms/IPO/
> LowerTypeTests.cpp:1328:69
>     #2 0x3edf5f9 in (anonymous namespace)::LowerTypeTests::runOnModule(llvm::Module&)
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/Transforms/IPO/LowerTypeTests.cpp:367
>     #3 0x3c3bfde in runOnModule /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/IR/
> LegacyPassManager.cpp:1590:27
>     #4 0x3c3bfde in llvm::legacy::PassManagerImpl::run(llvm::Module&)
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/IR/
> LegacyPassManager.cpp:1693
>     #5 0x801a1f in main /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/tools/opt/opt.cpp:731:10
>     #6 0x7fcac693d82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.
> so.6+0x2082f)
>     #7 0x7634d8 in _start (/mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/opt+0x7634d8)
>
> SUMMARY: MemorySanitizer: use-of-uninitialized-value
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/Transforms/IPO/LowerTypeTests.cpp:1352:23 in (anonymous
> namespace)::LowerTypeTestsModule::lower()
> Exiting
> FileCheck error: '-' is empty.
> FileCheck command line:  /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm_build_msan/./bin/FileCheck
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/test/Transforms/LowerTypeTests/import-unsat.ll
>
> --
>
> ********************
> Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
> Testing Time: 197.85s
> ********************
> Failing Tests (3):
>     LLVM :: LTO/Resolution/X86/lowertypetests.ll
>     LLVM :: Transforms/LowerTypeTests/import-unsat.ll
>     LLVM :: Transforms/LowerTypeTests/import.ll
>
>   Expected Passes    : 18870
>
> ==9209==ERROR: AddressSanitizer: heap-use-after-free on address
> 0x60e000007158 at pc 0x00000406c087 bp 0x7f8aeeff4f90 sp 0x7f8aeeff4f88
> READ of size 8 at 0x60e000007158 thread T1
>     #0 0x406c086 in materialized_use_begin /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/Value.h:314:63
>     #1 0x406c086 in materialized_uses /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/Value.h:329
>     #2 0x406c086 in uses /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/Value.h:336
>     #3 0x406c086 in (anonymous namespace)::LowerTypeTestsModule::lower()
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/Transforms/IPO/LowerTypeTests.cpp:1352
>     #4 0x406f330 in (anonymous namespace)::LowerTypeTests::runOnModule(llvm::Module&)
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/Transforms/IPO/LowerTypeTests.cpp:368:53
>     #5 0x291d38a in runOnModule /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/IR/
> LegacyPassManager.cpp:1590:27
>     #6 0x291d38a in llvm::legacy::PassManagerImpl::run(llvm::Module&)
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/IR/
> LegacyPassManager.cpp:1693
>     #7 0x2a1e6ea in runOldPMPasses /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/LTO/LTOBackend.cpp:191:10
>     #8 0x2a1e6ea in (anonymous namespace)::opt(llvm::lto::Config&,
> llvm::TargetMachine*, unsigned int, llvm::Module&, bool,
> llvm::ModuleSummaryIndex&) /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/LTO/LTOBackend.cpp:197
>     #9 0x2a20524 in llvm::lto::thinBackend(llvm::lto::Config&, unsigned
> int, std::__1::function<std::__1::unique_ptr<llvm::lto::NativeObjectStream,
> std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned
> int)>, llvm::Module&, llvm::ModuleSummaryIndex&,
> llvm::StringMap<std::__1::map<unsigned long, unsigned int,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, unsigned int> > >, llvm::MallocAllocator> const&,
> std::__1::map<unsigned long, llvm::GlobalValueSummary*,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, llvm::GlobalValueSummary*> > > const&, llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > >&) /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/LTO/LTOBackend.cpp:373:8
>     #10 0x2a145ae in (anonymous namespace)::InProcessThinBackend::
> runThinLTOBackendThread(std::__1::function<std::__1::unique_
> ptr<llvm::lto::NativeObjectStream, std::__1::default_delete<llvm::lto::NativeObjectStream>
> > (unsigned int)>, std::__1::function<std::__1::
> function<std::__1::unique_ptr<llvm::lto::NativeObjectStream,
> std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>
> (unsigned int, llvm::StringRef)>, unsigned int, llvm::BitcodeModule,
> llvm::ModuleSummaryIndex&, llvm::StringMap<std::__1::map<unsigned long,
> unsigned int, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, unsigned int> > >, llvm::MallocAllocator> const&,
> std::__1::unordered_set<unsigned long, std::__1::hash<unsigned long>,
> std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> >
> const&, std::__1::map<unsigned long, llvm::GlobalValue::LinkageTypes,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, llvm::GlobalValue::LinkageTypes> > > const&,
> std::__1::map<unsigned long, llvm::GlobalValueSummary*,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, llvm::GlobalValueSummary*> > > const&, llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > >&)::{lambda(std::__1::
> function<std::__1::unique_ptr<llvm::lto::NativeObjectStream,
> std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned
> int)>)#1}::operator()(std::__1::function<std::__1::unique_ptr<llvm::lto::NativeObjectStream,
> std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned
> int)>) const /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/LTO/LTO.cpp:663:14
>     #11 0x2a127ff in runThinLTOBackendThread /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/LTO/LTO.cpp:674:14
>     #12 0x2a127ff in operator() /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/LTO/LTO.cpp:704
>     #13 0x2a127ff in __invoke<(lambda at /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/LTO/LTO.cpp:697:9) &,
> llvm::BitcodeModule &, llvm::ModuleSummaryIndex &, const
> llvm::StringMap<std::__1::map<unsigned long, unsigned int,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<const
> unsigned long, unsigned int> > >, llvm::MallocAllocator> &, const
> std::__1::unordered_set<unsigned long, std::__1::hash<unsigned long>,
> std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> > &,
> const std::__1::map<unsigned long, llvm::GlobalValue::LinkageTypes,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<const
> unsigned long, llvm::GlobalValue::LinkageTypes> > > &, const
> std::__1::map<unsigned long, llvm::GlobalValueSummary *,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<const
> unsigned long, llvm::GlobalValueSummary *> > > &, llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > > &> /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_asan/
> include/c++/v1/type_traits:4301
>     #14 0x2a127ff in __apply_functor<(lambda at /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/LTO/LTO.cpp:697:9),
> std::__1::tuple<llvm::BitcodeModule, std::__1::reference_wrapper<llvm::ModuleSummaryIndex>,
> std::__1::reference_wrapper<const llvm::StringMap<std::__1::map<unsigned
> long, unsigned int, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<const unsigned long, unsigned int> >
> >, llvm::MallocAllocator> >, std::__1::reference_wrapper<const
> std::__1::unordered_set<unsigned long, std::__1::hash<unsigned long>,
> std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> > >,
> std::__1::reference_wrapper<const std::__1::map<unsigned long,
> llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<const unsigned long,
> llvm::GlobalValue::LinkageTypes> > > >, std::__1::reference_wrapper<const
> std::__1::map<unsigned long, llvm::GlobalValueSummary *,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<const
> unsigned long, llvm::GlobalValueSummary *> > > >,
> std::__1::reference_wrapper<llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > > > >, 0, 1, 2, 3, 4, 5, 6, std::__1::tuple<> >
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/libcxx_build_asan/include/c++/v1/functional:2217
>     #15 0x2a127ff in operator()<> /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_asan/
> include/c++/v1/functional:2250
>     #16 0x2a127ff in __invoke<std::__1::__bind<(lambda at
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/LTO/LTO.cpp:697:9), llvm::BitcodeModule &,
> std::__1::reference_wrapper<llvm::ModuleSummaryIndex>,
> std::__1::reference_wrapper<const llvm::StringMap<std::__1::map<unsigned
> long, unsigned int, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<const unsigned long, unsigned int> >
> >, llvm::MallocAllocator> >, std::__1::reference_wrapper<const
> std::__1::unordered_set<unsigned long, std::__1::hash<unsigned long>,
> std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> > >,
> std::__1::reference_wrapper<const std::__1::map<unsigned long,
> llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<const unsigned long,
> llvm::GlobalValue::LinkageTypes> > > >, std::__1::reference_wrapper<const
> std::__1::map<unsigned long, llvm::GlobalValueSummary *,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<const
> unsigned long, llvm::GlobalValueSummary *> > > >,
> std::__1::reference_wrapper<llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > > > > &> /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_asan/
> include/c++/v1/type_traits:4301
>     #17 0x2a127ff in __call<std::__1::__bind<(lambda at
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/LTO/LTO.cpp:697:9), llvm::BitcodeModule &,
> std::__1::reference_wrapper<llvm::ModuleSummaryIndex>,
> std::__1::reference_wrapper<const llvm::StringMap<std::__1::map<unsigned
> long, unsigned int, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<const unsigned long, unsigned int> >
> >, llvm::MallocAllocator> >, std::__1::reference_wrapper<const
> std::__1::unordered_set<unsigned long, std::__1::hash<unsigned long>,
> std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> > >,
> std::__1::reference_wrapper<const std::__1::map<unsigned long,
> llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<const unsigned long,
> llvm::GlobalValue::LinkageTypes> > > >, std::__1::reference_wrapper<const
> std::__1::map<unsigned long, llvm::GlobalValueSummary *,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<const
> unsigned long, llvm::GlobalValueSummary *> > > >,
> std::__1::reference_wrapper<llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > > > > &> /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_asan/
> include/c++/v1/__functional_base:359
>     #18 0x2a127ff in std::__1::__function::__func<std::__1::__bind<(anonymous
> namespace)::InProcessThinBackend::start(unsigned int,
> llvm::BitcodeModule, llvm::StringMap<std::__1::map<unsigned long,
> unsigned int, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, unsigned int> > >, llvm::MallocAllocator> const&,
> std::__1::unordered_set<unsigned long, std::__1::hash<unsigned long>,
> std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> >
> const&, std::__1::map<unsigned long, llvm::GlobalValue::LinkageTypes,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, llvm::GlobalValue::LinkageTypes> > > const&,
> llvm::MapVector<llvm::StringRef, llvm::BitcodeModule,
> llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef>,
> llvm::detail::DenseMapPair<llvm::StringRef, unsigned int> >,
> std::__1::vector<std::__1::pair<llvm::StringRef, llvm::BitcodeModule>,
> std::__1::allocator<std::__1::pair<llvm::StringRef, llvm::BitcodeModule>
> > > >&)::{lambda(llvm::BitcodeModule, llvm::ModuleSummaryIndex&,
> llvm::StringMap<std::__1::map<unsigned long, unsigned int,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, unsigned int> > >, llvm::MallocAllocator> const&,
> std::__1::unordered_set<unsigned long, std::__1::hash<unsigned long>,
> std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> >
> const&, std::__1::map<unsigned long, llvm::GlobalValue::LinkageTypes,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, llvm::GlobalValue::LinkageTypes> > > const&,
> std::__1::map<unsigned long, llvm::GlobalValueSummary*,
> std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, llvm::GlobalValueSummary*> > > const&, llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > >&)#1}, llvm::BitcodeModule&,
> std::__1::reference_wrapper<llvm::ModuleSummaryIndex>,
> llvm::BitcodeModule&<llvm::StringMap<std::__1::map<unsigned long,
> unsigned int, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned
> long const, unsigned int> > >, llvm::MallocAllocator> const>,
> llvm::BitcodeModule&<std::__1::unordered_set<unsigned long,
> std::__1::hash<unsigned long>, std::__1::equal_to<unsigned long>,
> std::__1::allocator<unsigned long> > const>, llvm::BitcodeModule&<std::__1::map<unsigned
> long, llvm::GlobalValue::LinkageTypes, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<unsigned long const,
> llvm::GlobalValue::LinkageTypes> > > const>,
> llvm::BitcodeModule&<std::__1::map<unsigned long,
> llvm::GlobalValueSummary*, std::__1::less<unsigned long>,
> std::__1::allocator<std::__1::pair<unsigned long const,
> llvm::GlobalValueSummary*> > > const>, llvm::BitcodeModule&<llvm::MapVector<llvm::StringRef,
> llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int,
> llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef,
> unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef,
> llvm::BitcodeModule> > > > > >, std::__1::allocator<llvm::
> BitcodeModule&<llvm::MapVector<llvm::StringRef, llvm::BitcodeModule,
> llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef>,
> llvm::detail::DenseMapPair<llvm::StringRef, unsigned int> >,
> std::__1::vector<std::__1::pair<llvm::StringRef, llvm::BitcodeModule>,
> std::__1::allocator<std::__1::pair<llvm::StringRef, llvm::BitcodeModule>
> > > > > >, void ()>::operator()() /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_asan/
> include/c++/v1/functional:1552
>     #19 0x2d558bd in operator() /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_asan/
> include/c++/v1/future:1997:12
>     #20 0x2d558bd in operator() /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_asan/
> include/c++/v1/future:2217
>     #21 0x2d558bd in operator() /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/Support/ThreadPool.cpp:57
>     #22 0x2d558bd in __invoke<(lambda at /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/llvm/lib/Support/ThreadPool.cpp:32:26)>
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/libcxx_build_asan/include/c++/v1/type_traits:4301
>     #23 0x2d558bd in __thread_execute<std::__1::
> unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>
> >, (lambda at /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/llvm/lib/Support/ThreadPool.cpp:32:26)> /mnt/b/sanitizer-buildbot3/
> sanitizer-x86_64-linux-fast/build/libcxx_build_asan/
> include/c++/v1/thread:336
>     #24 0x2d558bd in void* std::__1::__thread_proxy<std::
> __1::tuple<std::__1::unique_ptr<std::__1::__thread_struct,
> std::__1::default_delete<std::__1::__thread_struct> >,
> llvm::ThreadPool::ThreadPool(unsigned int)::$_0> >(void*)
> /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/
> build/libcxx_build_asan/include/c++/v1/thread:346
>     #25 0x7f8af29ea6b9 in start_thread (/lib/x86_64-linux-gnu/
> libpthread.so.0+0x76b9)
>     #26 0x7f8af250a82c in clone (/lib/x86_64-linux-gnu/libc.so.6+0x10682c)
>
>
> On Fri, Jan 20, 2017 at 2:00 PM Peter Collingbourne via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: pcc
>> Date: Fri Jan 20 15:49:34 2017
>> New Revision: 292654
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=292654&view=rev
>> Log:
>> LowerTypeTests: Implement importing of type identifiers.
>>
>> To import a type identifier we read the summary and create external
>> references to the symbols defined when exporting.
>>
>> Differential Revision: https://reviews.llvm.org/D28546
>>
>> Added:
>>     llvm/trunk/test/Transforms/LowerTypeTests/Inputs/import.yaml
>>     llvm/trunk/test/Transforms/LowerTypeTests/import.ll
>> Modified:
>>     llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp
>>
>> Modified: llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/
>> Transforms/IPO/LowerTypeTests.cpp?rev=292654&r1=292653&r2=
>> 292654&view=diff
>> ============================================================
>> ==================
>> --- llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp (original)
>> +++ llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp Fri Jan 20 15:49:34
>> 2017
>> @@ -295,6 +295,8 @@ class LowerTypeTestsModule {
>>    Function *WeakInitializerFn = nullptr;
>>
>>    void exportTypeId(StringRef TypeId, const TypeIdLowering &TIL);
>> +  TypeIdLowering importTypeId(StringRef TypeId);
>> +  void importTypeTest(CallInst *CI);
>>
>>    BitSetInfo
>>    buildBitSet(Metadata *TypeId,
>> @@ -499,10 +501,12 @@ Value *LowerTypeTestsModule::createBitSe
>>      return createMaskedBitTest(B, TIL.InlineBits, BitOffset);
>>    } else {
>>      Constant *ByteArray = TIL.TheByteArray;
>> -    if (!LinkerSubsectionsViaSymbols && AvoidReuse) {
>> +    if (!LinkerSubsectionsViaSymbols && AvoidReuse &&
>> +        Action != SummaryAction::Import) {
>>        // Each use of the byte array uses a different alias. This makes
>> the
>>        // backend less likely to reuse previously computed byte array
>> addresses,
>>        // improving the security of the CFI mechanism based on this pass.
>> +      // This won't work when importing because TheByteArray is external.
>>        ByteArray = GlobalAlias::create(Int8Ty, 0,
>> GlobalValue::PrivateLinkage,
>>                                        "bits_use", ByteArray, &M);
>>      }
>> @@ -598,7 +602,7 @@ Value *LowerTypeTestsModule::lowerTypeTe
>>                       IntPtrTy));
>>    Value *BitOffset = B.CreateOr(OffsetSHR, OffsetSHL);
>>
>> -  Constant *BitSizeConst = ConstantExpr::getZExt(TIL.SizeM1, IntPtrTy);
>> +  Constant *BitSizeConst = ConstantExpr::getZExtOrBitCast(TIL.SizeM1,
>> IntPtrTy);
>>    Value *OffsetInRange = B.CreateICmpULE(BitOffset, BitSizeConst);
>>
>>    // If the bit set is all ones, testing against it is unnecessary.
>> @@ -735,6 +739,78 @@ void LowerTypeTestsModule::exportTypeId(
>>                   ConstantExpr::getIntToPtr(TIL.InlineBits, Int8PtrTy));
>>  }
>>
>> +LowerTypeTestsModule::TypeIdLowering
>> +LowerTypeTestsModule::importTypeId(StringRef TypeId) {
>> +  TypeTestResolution &TTRes = Summary->getTypeIdSummary(TypeId).TTRes;
>> +
>> +  TypeIdLowering TIL;
>> +  TIL.TheKind = TTRes.TheKind;
>> +
>> +  auto ImportGlobal = [&](StringRef Name, unsigned AbsWidth) {
>> +    unsigned PtrWidth = IntPtrTy->getBitWidth();
>> +    Constant *C =
>> +        M.getOrInsertGlobal(("__typeid_" + TypeId + "_" + Name).str(),
>> Int8Ty);
>> +    auto *GV = dyn_cast<GlobalVariable>(C);
>> +    // We only need to set metadata if the global is newly created, in
>> which
>> +    // case it would not have hidden visibility.
>> +    if (!GV || GV->getVisibility() == GlobalValue::HiddenVisibility)
>> +      return C;
>> +
>> +    GV->setVisibility(GlobalValue::HiddenVisibility);
>> +    auto SetAbsRange = [&](uint64_t Min, uint64_t Max) {
>> +      auto *T = IntegerType::get(M.getContext(), PtrWidth);
>> +      auto *MinC = ConstantAsMetadata::get(ConstantInt::get(T, Min));
>> +      auto *MaxC = ConstantAsMetadata::get(ConstantInt::get(T, Max));
>> +      GV->setMetadata(LLVMContext::MD_absolute_symbol,
>> +                      MDNode::get(M.getContext(), {MinC, MaxC}));
>> +    };
>> +    if (AbsWidth == PtrWidth)
>> +      SetAbsRange(~0ull, ~0ull); // Full set.
>> +    else if (AbsWidth)
>> +      SetAbsRange(0, 1ull << AbsWidth);
>> +    return C;
>> +  };
>> +
>> +  if (TIL.TheKind != TypeTestResolution::Unsat)
>> +    TIL.OffsetedGlobal = ImportGlobal("global_addr", 0);
>> +
>> +  if (TIL.TheKind == TypeTestResolution::ByteArray ||
>> +      TIL.TheKind == TypeTestResolution::Inline ||
>> +      TIL.TheKind == TypeTestResolution::AllOnes) {
>> +    TIL.AlignLog2 = ConstantExpr::getPtrToInt(ImportGlobal("align", 8),
>> Int8Ty);
>> +    TIL.SizeM1 = ConstantExpr::getPtrToInt(
>> +        ImportGlobal("size_m1", TTRes.SizeM1BitWidth), IntPtrTy);
>> +  }
>> +
>> +  if (TIL.TheKind == TypeTestResolution::ByteArray) {
>> +    TIL.TheByteArray = ImportGlobal("byte_array", 0);
>> +    TIL.BitMask = ImportGlobal("bit_mask", 8);
>> +  }
>> +
>> +  if (TIL.TheKind == TypeTestResolution::Inline)
>> +    TIL.InlineBits = ConstantExpr::getPtrToInt(
>> +        ImportGlobal("inline_bits", 1 << TTRes.SizeM1BitWidth),
>> +        TTRes.SizeM1BitWidth <= 5 ? Int32Ty : Int64Ty);
>> +
>> +  return TIL;
>> +}
>> +
>> +void LowerTypeTestsModule::importTypeTest(CallInst *CI) {
>> +  auto TypeIdMDVal = dyn_cast<MetadataAsValue>(CI->getArgOperand(1));
>> +  if (!TypeIdMDVal)
>> +    report_fatal_error("Second argument of llvm.type.test must be
>> metadata");
>> +
>> +  auto TypeIdStr = dyn_cast<MDString>(TypeIdMDVal->getMetadata());
>> +  if (!TypeIdStr)
>> +    report_fatal_error(
>> +        "Second argument of llvm.type.test must be a metadata string");
>> +
>> +  TypeIdLowering TIL = importTypeId(TypeIdStr->getString());
>> +  Value *Lowered = lowerTypeTestCall(TypeIdStr, CI, TIL);
>> +  CI->replaceAllUsesWith(Lowered);
>> +  CI->eraseFromParent();
>> +}
>> +
>>  void LowerTypeTestsModule::lowerTypeTestCalls(
>>      ArrayRef<Metadata *> TypeIds, Constant *CombinedGlobalAddr,
>>      const DenseMap<GlobalTypeMember *, uint64_t> &GlobalLayout) {
>> @@ -1272,6 +1348,12 @@ bool LowerTypeTestsModule::lower() {
>>        Action != SummaryAction::Export)
>>      return false;
>>
>> +  if (Action == SummaryAction::Import) {
>> +    for (const Use &U : TypeTestFunc->uses())
>> +      importTypeTest(cast<CallInst>(U.getUser()));
>> +    return true;
>> +  }
>> +
>>    // Equivalence class set containing type identifiers and the globals
>> that
>>    // reference them. This is used to partition the set of type
>> identifiers in
>>    // the module into disjoint sets.
>>
>> Added: llvm/trunk/test/Transforms/LowerTypeTests/Inputs/import.yaml
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/
>> Transforms/LowerTypeTests/Inputs/import.yaml?rev=292654&view=auto
>> ============================================================
>> ==================
>> --- llvm/trunk/test/Transforms/LowerTypeTests/Inputs/import.yaml (added)
>> +++ llvm/trunk/test/Transforms/LowerTypeTests/Inputs/import.yaml Fri Jan
>> 20 15:49:34 2017
>> @@ -0,0 +1,31 @@
>> +---
>> +TypeIdMap:
>> +  allones7:
>> +    TTRes:
>> +      Kind: AllOnes
>> +      SizeM1BitWidth: 7
>> +  allones32:
>> +    TTRes:
>> +      Kind: AllOnes
>> +      SizeM1BitWidth: 32
>> +  bytearray7:
>> +    TTRes:
>> +      Kind: ByteArray
>> +      SizeM1BitWidth: 7
>> +  bytearray32:
>> +    TTRes:
>> +      Kind: ByteArray
>> +      SizeM1BitWidth: 32
>> +  inline5:
>> +    TTRes:
>> +      Kind: Inline
>> +      SizeM1BitWidth: 5
>> +  inline6:
>> +    TTRes:
>> +      Kind: Inline
>> +      SizeM1BitWidth: 6
>> +  single:
>> +    TTRes:
>> +      Kind: Single
>> +      SizeM1BitWidth: 0
>> +...
>>
>> Added: llvm/trunk/test/Transforms/LowerTypeTests/import.ll
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/
>> Transforms/LowerTypeTests/import.ll?rev=292654&view=auto
>> ============================================================
>> ==================
>> --- llvm/trunk/test/Transforms/LowerTypeTests/import.ll (added)
>> +++ llvm/trunk/test/Transforms/LowerTypeTests/import.ll Fri Jan 20
>> 15:49:34 2017
>> @@ -0,0 +1,170 @@
>> +; RUN: opt -S -lowertypetests -lowertypetests-summary-action=import
>> -lowertypetests-read-summary=%S/Inputs/import.yaml < %s | FileCheck %s
>> +
>> +target datalayout = "e-p:64:64"
>> +
>> +declare i1 @llvm.type.test(i8* %ptr, metadata %bitset) nounwind readnone
>> +
>> +; CHECK-DAG: @__typeid_single_global_addr = external hidden global i8
>> +; CHECK-DAG: @__typeid_inline6_global_addr = external hidden global i8
>> +; CHECK-DAG: @__typeid_inline6_align = external hidden global i8,
>> !absolute_symbol !0
>> +; CHECK-DAG: @__typeid_inline6_size_m1 = external hidden global i8,
>> !absolute_symbol !1
>> +; CHECK-DAG: @__typeid_inline6_inline_bits = external hidden global i8,
>> !absolute_symbol !2
>> +; CHECK-DAG: @__typeid_inline5_global_addr = external hidden global i8
>> +; CHECK-DAG: @__typeid_inline5_align = external hidden global i8,
>> !absolute_symbol !0
>> +; CHECK-DAG: @__typeid_inline5_size_m1 = external hidden global i8,
>> !absolute_symbol !3
>> +; CHECK-DAG: @__typeid_inline5_inline_bits = external hidden global i8,
>> !absolute_symbol !4
>> +; CHECK-DAG: @__typeid_bytearray32_global_addr = external hidden global
>> i8
>> +; CHECK-DAG: @__typeid_bytearray32_align = external hidden global i8,
>> !absolute_symbol !0
>> +; CHECK-DAG: @__typeid_bytearray32_size_m1 = external hidden global i8,
>> !absolute_symbol !4
>> +; CHECK-DAG: @__typeid_bytearray32_byte_array = external hidden global
>> i8
>> +; CHECK-DAG: @__typeid_bytearray32_bit_mask = external hidden global i8,
>> !absolute_symbol !0
>> +; CHECK-DAG: @__typeid_bytearray7_global_addr = external hidden global
>> i8
>> +; CHECK-DAG: @__typeid_bytearray7_align = external hidden global i8,
>> !absolute_symbol !0
>> +; CHECK-DAG: @__typeid_bytearray7_size_m1 = external hidden global i8,
>> !absolute_symbol !5
>> +; CHECK-DAG: @__typeid_bytearray7_byte_array = external hidden global i8
>> +; CHECK-DAG: @__typeid_bytearray7_bit_mask = external hidden global i8,
>> !absolute_symbol !0
>> +; CHECK-DAG: @__typeid_allones32_global_addr = external hidden global i8
>> +; CHECK-DAG: @__typeid_allones32_align = external hidden global i8,
>> !absolute_symbol !0
>> +; CHECK-DAG: @__typeid_allones32_size_m1 = external hidden global i8,
>> !absolute_symbol !4
>> +; CHECK-DAG: @__typeid_allones7_global_addr = external hidden global i8
>> +; CHECK-DAG: @__typeid_allones7_align = external hidden global i8,
>> !absolute_symbol !0
>> +; CHECK-DAG: @__typeid_allones7_size_m1 = external hidden global i8,
>> !absolute_symbol !5
>> +
>> +; CHECK: define i1 @allones7(i8* [[p:%.*]])
>> +define i1 @allones7(i8* %p) {
>> +  ; CHECK-NEXT: [[pi:%.*]] = ptrtoint i8* [[p]] to i64
>> +  ; CHECK-NEXT: [[sub:%.*]] = sub i64 [[pi]], ptrtoint (i8*
>> @__typeid_allones7_global_addr to i64)
>> +  ; CHECK-NEXT: [[lshr:%.*]] = lshr i64 [[sub]], zext (i8 ptrtoint (i8*
>> @__typeid_allones7_align to i8) to i64)
>> +  ; CHECK-NEXT: [[shl:%.*]] = shl i64 [[sub]], zext (i8 sub (i8 64, i8
>> ptrtoint (i8* @__typeid_allones7_align to i8)) to i64)
>> +  ; CHECK-NEXT: [[or:%.*]] = or i64 [[lshr]], [[shl]]
>> +  ; CHECK-NEXT: [[ule:%.*]] = icmp ule i64 [[or]], ptrtoint (i8*
>> @__typeid_allones7_size_m1 to i64)
>> +  ; CHECK-NEXT: ret i1 [[ule]]
>> +  %x = call i1 @llvm.type.test(i8* %p, metadata !"allones7")
>> +  ret i1 %x
>> +}
>> +
>> +; CHECK: define i1 @allones32(i8* [[p:%.*]])
>> +define i1 @allones32(i8* %p) {
>> +  ; CHECK-NEXT: [[pi:%.*]] = ptrtoint i8* [[p]] to i64
>> +  ; CHECK-NEXT: [[sub:%.*]] = sub i64 [[pi]], ptrtoint (i8*
>> @__typeid_allones32_global_addr to i64)
>> +  ; CHECK-NEXT: [[lshr:%.*]] = lshr i64 [[sub]], zext (i8 ptrtoint (i8*
>> @__typeid_allones32_align to i8) to i64)
>> +  ; CHECK-NEXT: [[shl:%.*]] = shl i64 [[sub]], zext (i8 sub (i8 64, i8
>> ptrtoint (i8* @__typeid_allones32_align to i8)) to i64)
>> +  ; CHECK-NEXT: [[or:%.*]] = or i64 [[lshr]], [[shl]]
>> +  ; CHECK-NEXT: [[ule:%.*]] = icmp ule i64 [[or]], ptrtoint (i8*
>> @__typeid_allones32_size_m1 to i64)
>> +  ; CHECK-NEXT: ret i1 [[ule]]
>> +  %x = call i1 @llvm.type.test(i8* %p, metadata !"allones32")
>> +  ret i1 %x
>> +}
>> +
>> +; CHECK: define i1 @bytearray7(i8* [[p:%.*]])
>> +define i1 @bytearray7(i8* %p) {
>> +  ; CHECK-NEXT: [[pi:%.*]] = ptrtoint i8* [[p]] to i64
>> +  ; CHECK-NEXT: [[sub:%.*]] = sub i64 [[pi]], ptrtoint (i8*
>> @__typeid_bytearray7_global_addr to i64)
>> +  ; CHECK-NEXT: [[lshr:%.*]] = lshr i64 [[sub]], zext (i8 ptrtoint (i8*
>> @__typeid_bytearray7_align to i8) to i64)
>> +  ; CHECK-NEXT: [[shl:%.*]] = shl i64 [[sub]], zext (i8 sub (i8 64, i8
>> ptrtoint (i8* @__typeid_bytearray7_align to i8)) to i64)
>> +  ; CHECK-NEXT: [[or:%.*]] = or i64 [[lshr]], [[shl]]
>> +  ; CHECK-NEXT: [[ule:%.*]] = icmp ule i64 [[or]], ptrtoint (i8*
>> @__typeid_bytearray7_size_m1 to i64)
>> +  ; CHECK-NEXT: br i1 [[ule]], label %[[t:.*]], label %[[f:.*]]
>> +
>> +  ; CHECK: [[t]]:
>> +  ; CHECK-NEXT: [[gep:%.*]] = getelementptr i8, i8*
>> @__typeid_bytearray7_byte_array, i64 [[or]]
>> +  ; CHECK-NEXT: [[load:%.*]] = load i8, i8* [[gep]]
>> +  ; CHECK-NEXT: [[and:%.*]] = and i8 [[load]], ptrtoint (i8*
>> @__typeid_bytearray7_bit_mask to i8)
>> +  ; CHECK-NEXT: [[ne:%.*]] = icmp ne i8 [[and]], 0
>> +  ; CHECK-NEXT: br label %[[f]]
>> +
>> +  ; CHECK: [[f]]:
>> +  ; CHECK-NEXT: [[phi:%.*]] = phi i1 [ false, %0 ], [ [[ne]], %[[t]] ]
>> +  ; CHECK-NEXT: ret i1 [[phi]]
>> +  %x = call i1 @llvm.type.test(i8* %p, metadata !"bytearray7")
>> +  ret i1 %x
>> +}
>> +
>> +; CHECK: define i1 @bytearray32(i8* [[p:%.*]])
>> +define i1 @bytearray32(i8* %p) {
>> +  ; CHECK-NEXT: [[pi:%.*]] = ptrtoint i8* [[p]] to i64
>> +  ; CHECK-NEXT: [[sub:%.*]] = sub i64 [[pi]], ptrtoint (i8*
>> @__typeid_bytearray32_global_addr to i64)
>> +  ; CHECK-NEXT: [[lshr:%.*]] = lshr i64 [[sub]], zext (i8 ptrtoint (i8*
>> @__typeid_bytearray32_align to i8) to i64)
>> +  ; CHECK-NEXT: [[shl:%.*]] = shl i64 [[sub]], zext (i8 sub (i8 64, i8
>> ptrtoint (i8* @__typeid_bytearray32_align to i8)) to i64)
>> +  ; CHECK-NEXT: [[or:%.*]] = or i64 [[lshr]], [[shl]]
>> +  ; CHECK-NEXT: [[ule:%.*]] = icmp ule i64 [[or]], ptrtoint (i8*
>> @__typeid_bytearray32_size_m1 to i64)
>> +  ; CHECK-NEXT: br i1 [[ule]], label %[[t:.*]], label %[[f:.*]]
>> +
>> +  ; CHECK: [[t]]:
>> +  ; CHECK-NEXT: [[gep:%.*]] = getelementptr i8, i8*
>> @__typeid_bytearray32_byte_array, i64 [[or]]
>> +  ; CHECK-NEXT: [[load:%.*]] = load i8, i8* [[gep]]
>> +  ; CHECK-NEXT: [[and:%.*]] = and i8 [[load]], ptrtoint (i8*
>> @__typeid_bytearray32_bit_mask to i8)
>> +  ; CHECK-NEXT: [[ne:%.*]] = icmp ne i8 [[and]], 0
>> +  ; CHECK-NEXT: br label %[[f]]
>> +
>> +  ; CHECK: [[f]]:
>> +  ; CHECK-NEXT: [[phi:%.*]] = phi i1 [ false, %0 ], [ [[ne]], %[[t]] ]
>> +  ; CHECK-NEXT: ret i1 [[phi]]
>> +  %x = call i1 @llvm.type.test(i8* %p, metadata !"bytearray32")
>> +  ret i1 %x
>> +}
>> +
>> +; CHECK: define i1 @inline5(i8* [[p:%.*]])
>> +define i1 @inline5(i8* %p) {
>> +  ; CHECK-NEXT: [[pi:%.*]] = ptrtoint i8* [[p]] to i64
>> +  ; CHECK-NEXT: [[sub:%.*]] = sub i64 [[pi]], ptrtoint (i8*
>> @__typeid_inline5_global_addr to i64)
>> +  ; CHECK-NEXT: [[lshr:%.*]] = lshr i64 [[sub]], zext (i8 ptrtoint (i8*
>> @__typeid_inline5_align to i8) to i64)
>> +  ; CHECK-NEXT: [[shl:%.*]] = shl i64 [[sub]], zext (i8 sub (i8 64, i8
>> ptrtoint (i8* @__typeid_inline5_align to i8)) to i64)
>> +  ; CHECK-NEXT: [[or:%.*]] = or i64 [[lshr]], [[shl]]
>> +  ; CHECK-NEXT: [[ule:%.*]] = icmp ule i64 [[or]], ptrtoint (i8*
>> @__typeid_inline5_size_m1 to i64)
>> +  ; CHECK-NEXT: br i1 [[ule]], label %[[t:.*]], label %[[f:.*]]
>> +
>> +  ; CHECK: [[t]]:
>> +  ; CHECK-NEXT: [[trunc:%.*]] = trunc i64 [[or]] to i32
>> +  ; CHECK-NEXT: [[and:%.*]] = and i32 [[trunc]], 31
>> +  ; CHECK-NEXT: [[shl2:%.*]] = shl i32 1, [[and]]
>> +  ; CHECK-NEXT: [[and2:%.*]] = and i32 ptrtoint (i8*
>> @__typeid_inline5_inline_bits to i32), [[shl2]]
>> +  ; CHECK-NEXT: [[ne:%.*]] = icmp ne i32 [[and2]], 0
>> +  ; CHECK-NEXT: br label %[[f]]
>> +
>> +  ; CHECK: [[f]]:
>> +  ; CHECK-NEXT: [[phi:%.*]] = phi i1 [ false, %0 ], [ [[ne]], %[[t]] ]
>> +  ; CHECK-NEXT: ret i1 [[phi]]
>> +  %x = call i1 @llvm.type.test(i8* %p, metadata !"inline5")
>> +  ret i1 %x
>> +}
>> +
>> +; CHECK: define i1 @inline6(i8* [[p:%.*]])
>> +define i1 @inline6(i8* %p) {
>> +  ; CHECK-NEXT: [[pi:%.*]] = ptrtoint i8* [[p]] to i64
>> +  ; CHECK-NEXT: [[sub:%.*]] = sub i64 [[pi]], ptrtoint (i8*
>> @__typeid_inline6_global_addr to i64)
>> +  ; CHECK-NEXT: [[lshr:%.*]] = lshr i64 [[sub]], zext (i8 ptrtoint (i8*
>> @__typeid_inline6_align to i8) to i64)
>> +  ; CHECK-NEXT: [[shl:%.*]] = shl i64 [[sub]], zext (i8 sub (i8 64, i8
>> ptrtoint (i8* @__typeid_inline6_align to i8)) to i64)
>> +  ; CHECK-NEXT: [[or:%.*]] = or i64 [[lshr]], [[shl]]
>> +  ; CHECK-NEXT: [[ule:%.*]] = icmp ule i64 [[or]], ptrtoint (i8*
>> @__typeid_inline6_size_m1 to i64)
>> +  ; CHECK-NEXT: br i1 [[ule]], label %[[t:.*]], label %[[f:.*]]
>> +
>> +  ; CHECK: [[t]]:
>> +  ; CHECK-NEXT: [[and:%.*]] = and i64 [[or]], 63
>> +  ; CHECK-NEXT: [[shl2:%.*]] = shl i64 1, [[and]]
>> +  ; CHECK-NEXT: [[and2:%.*]] = and i64 ptrtoint (i8*
>> @__typeid_inline6_inline_bits to i64), [[shl2]]
>> +  ; CHECK-NEXT: [[ne:%.*]] = icmp ne i64 [[and2]], 0
>> +  ; CHECK-NEXT: br label %[[f]]
>> +
>> +  ; CHECK: [[f]]:
>> +  ; CHECK-NEXT: [[phi:%.*]] = phi i1 [ false, %0 ], [ [[ne]], %[[t]] ]
>> +  ; CHECK-NEXT: ret i1 [[phi]]
>> +  %x = call i1 @llvm.type.test(i8* %p, metadata !"inline6")
>> +  ret i1 %x
>> +}
>> +
>> +; CHECK: define i1 @single(i8* [[p:%.*]])
>> +define i1 @single(i8* %p) {
>> +  ; CHECK-NEXT: [[pi:%.*]] = ptrtoint i8* [[p]] to i64
>> +  ; CHECK-NEXT: [[eq:%.*]] = icmp eq i64 [[pi]], ptrtoint (i8*
>> @__typeid_single_global_addr to i64)
>> +  ; CHECK-NEXT: ret i1 [[eq]]
>> +  %x = call i1 @llvm.type.test(i8* %p, metadata !"single")
>> +  ret i1 %x
>> +}
>> +
>> +; CHECK: !0 = !{i64 0, i64 256}
>> +; CHECK: !1 = !{i64 0, i64 64}
>> +; CHECK: !2 = !{i64 -1, i64 -1}
>> +; CHECK: !3 = !{i64 0, i64 32}
>> +; CHECK: !4 = !{i64 0, i64 4294967296}
>> +; CHECK: !5 = !{i64 0, i64 128}
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
> --
> Mike
> Sent from phone
>



-- 
-- 
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170120/33472fc8/attachment.html>


More information about the llvm-commits mailing list