Regression

LLVM.Transforms/DeadStoreElimination/MSSA.launder.invariant.group.ll (from LLVM)

Failing for the past 1 build (Since Failed#6936 )
Took 23 sec.

Stacktrace

Script:
--
: 'RUN: at line 1';   /Users/buildslave/jenkins/workspace/clang-stage2-cmake-RgSan/clang-build/bin/opt < /Users/buildslave/jenkins/workspace/clang-stage2-cmake-RgSan/llvm-project/llvm/test/Transforms/DeadStoreElimination/MSSA/launder.invariant.group.ll -basicaa -dse -enable-dse-memoryssa -S | /Users/buildslave/jenkins/workspace/clang-stage2-cmake-RgSan/clang-build/bin/FileCheck /Users/buildslave/jenkins/workspace/clang-stage2-cmake-RgSan/llvm-project/llvm/test/Transforms/DeadStoreElimination/MSSA/launder.invariant.group.ll
--
Exit Code: 2

Command Output (stderr):
--
=================================================================
==44528==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d000004660 at pc 0x00010af80774 bp 0x7ffee9695650 sp 0x7ffee9695648
READ of size 1 at 0x60d000004660 thread T0
    #0 0x10af80773 in (anonymous namespace)::eliminateDeadStoresMemorySSA(llvm::Function&, llvm::AAResults&, llvm::MemorySSA&, llvm::DominatorTree&, llvm::PostDominatorTree&, llvm::TargetLibraryInfo const&) Value.h:485
    #1 0x10a2f4b64 in llvm::FPPassManager::runOnFunction(llvm::Function&) LegacyPassManager.cpp:1482
    #2 0x10a2f56cb in llvm::FPPassManager::runOnModule(llvm::Module&) LegacyPassManager.cpp:1518
    #3 0x10a2f649f in llvm::legacy::PassManagerImpl::run(llvm::Module&) LegacyPassManager.cpp:1583
    #4 0x1065bc829 in main opt.cpp:940
    #5 0x7fff7dcae084 in start+0x0 (libdyld.dylib:x86_64+0x17084)

0x60d000004660 is located 64 bytes inside of 144-byte region [0x60d000004620,0x60d0000046b0)
freed by thread T0 here:
    #0 0x11882a64d in wrap__ZdlPv+0x7d (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x5264d)
    #1 0x1091f5231 in llvm::iplist_impl<llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::AllAccessTag> >, llvm::ilist_traits<llvm::MemoryAccess> >::erase(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MemoryAccess, false, false, llvm::MSSAHelpers::AllAccessTag>, false, false>) MemorySSA.h:233
    #2 0x1091ff6f1 in llvm::MemorySSA::removeFromLists(llvm::MemoryAccess*, bool) ilist.h:272
    #3 0x109227318 in llvm::MemorySSAUpdater::removeMemoryAccess(llvm::MemoryAccess*, bool) MemorySSAUpdater.cpp:1329
    #4 0x10af7f04f in (anonymous namespace)::eliminateDeadStoresMemorySSA(llvm::Function&, llvm::AAResults&, llvm::MemorySSA&, llvm::DominatorTree&, llvm::PostDominatorTree&, llvm::TargetLibraryInfo const&) DeadStoreElimination.cpp:1684
    #5 0x10a2f4b64 in llvm::FPPassManager::runOnFunction(llvm::Function&) LegacyPassManager.cpp:1482
    #6 0x10a2f56cb in llvm::FPPassManager::runOnModule(llvm::Module&) LegacyPassManager.cpp:1518
    #7 0x10a2f649f in llvm::legacy::PassManagerImpl::run(llvm::Module&) LegacyPassManager.cpp:1583
    #8 0x1065bc829 in main opt.cpp:940
    #9 0x7fff7dcae084 in start+0x0 (libdyld.dylib:x86_64+0x17084)

previously allocated by thread T0 here:
    #0 0x11882a22d in wrap__Znwm+0x7d (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x5222d)
    #1 0x10a438f8b in llvm::User::operator new(unsigned long, unsigned int) User.cpp:124
    #2 0x1091fcf4f in llvm::MemoryUseOrDef* llvm::MemorySSA::createNewAccess<llvm::BatchAAResults>(llvm::Instruction*, llvm::BatchAAResults*, llvm::MemoryUseOrDef const*) MemorySSA.h:389
    #3 0x1091f5ee1 in llvm::MemorySSA::buildMemorySSA(llvm::BatchAAResults&) MemorySSA.cpp:1528
    #4 0x1091f566d in llvm::MemorySSA::MemorySSA(llvm::Function&, llvm::AAResults*, llvm::DominatorTree*) MemorySSA.cpp:1235
    #5 0x109205374 in llvm::MemorySSAWrapperPass::runOnFunction(llvm::Function&) MemorySSA.cpp:1227
    #6 0x10a2f4b64 in llvm::FPPassManager::runOnFunction(llvm::Function&) LegacyPassManager.cpp:1482
    #7 0x10a2f56cb in llvm::FPPassManager::runOnModule(llvm::Module&) LegacyPassManager.cpp:1518
    #8 0x10a2f649f in llvm::legacy::PassManagerImpl::run(llvm::Module&) LegacyPassManager.cpp:1583
    #9 0x1065bc829 in main opt.cpp:940
    #10 0x7fff7dcae084 in start+0x0 (libdyld.dylib:x86_64+0x17084)

SUMMARY: AddressSanitizer: heap-use-after-free Value.h:485 in (anonymous namespace)::eliminateDeadStoresMemorySSA(llvm::Function&, llvm::AAResults&, llvm::MemorySSA&, llvm::DominatorTree&, llvm::PostDominatorTree&, llvm::TargetLibraryInfo const&)
Shadow bytes around the buggy address:
  0x1c1a00000870: fa fa fa fa fa fa 00 00 00 00 00 00 00 00 00 00
  0x1c1a00000880: 00 00 00 00 00 00 04 fa fa fa fa fa fa fa fa fa
  0x1c1a00000890: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1c1a000008a0: 04 fa fa fa fa fa fa fa fa fa 00 00 00 00 00 00
  0x1c1a000008b0: 00 00 00 00 00 00 00 00 00 00 00 00 fa fa fa fa
=>0x1c1a000008c0: fa fa fa fa fd fd fd fd fd fd fd fd[fd]fd fd fd
  0x1c1a000008d0: fd fd fd fd fd fd fa fa fa fa fa fa fa fa 00 00
  0x1c1a000008e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1c1a000008f0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
  0x1c1a00000900: 00 00 00 00 00 00 00 00 00 00 fa fa fa fa fa fa
  0x1c1a00000910: fa fa fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==44528==ABORTING
Stack dump:
0.	Program arguments: /Users/buildslave/jenkins/workspace/clang-stage2-cmake-RgSan/clang-build/bin/opt -basicaa -dse -enable-dse-memoryssa -S 
1.	Running pass 'Function Pass Manager' on module '<stdin>'.
2.	Running pass 'Dead Store Elimination' on function '@skipBarrier'
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /Users/buildslave/jenkins/workspace/clang-stage2-cmake-RgSan/clang-build/bin/FileCheck /Users/buildslave/jenkins/workspace/clang-stage2-cmake-RgSan/llvm-project/llvm/test/Transforms/DeadStoreElimination/MSSA/launder.invariant.group.ll

--