Regression

LLVM.Transforms/DeadStoreElimination/MSSA.int_sideeffect.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 -S < /Users/buildslave/jenkins/workspace/clang-stage2-cmake-RgSan/llvm-project/llvm/test/Transforms/DeadStoreElimination/MSSA/int_sideeffect.ll -dse -enable-dse-memoryssa | /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/int_sideeffect.ll
--
Exit Code: 2

Command Output (stderr):
--
=================================================================
==44520==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d000004660 at pc 0x000112e3e774 bp 0x7ffee17d7670 sp 0x7ffee17d7668
READ of size 1 at 0x60d000004660 thread T0
    #0 0x112e3e773 in (anonymous namespace)::eliminateDeadStoresMemorySSA(llvm::Function&, llvm::AAResults&, llvm::MemorySSA&, llvm::DominatorTree&, llvm::PostDominatorTree&, llvm::TargetLibraryInfo const&) Value.h:485
    #1 0x1121b2b64 in llvm::FPPassManager::runOnFunction(llvm::Function&) LegacyPassManager.cpp:1482
    #2 0x1121b36cb in llvm::FPPassManager::runOnModule(llvm::Module&) LegacyPassManager.cpp:1518
    #3 0x1121b449f in llvm::legacy::PassManagerImpl::run(llvm::Module&) LegacyPassManager.cpp:1583
    #4 0x10e47a829 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 0x11f8ea64d in wrap__ZdlPv+0x7d (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x5264d)
    #1 0x1110b3231 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 0x1110bd6f1 in llvm::MemorySSA::removeFromLists(llvm::MemoryAccess*, bool) ilist.h:272
    #3 0x1110e5318 in llvm::MemorySSAUpdater::removeMemoryAccess(llvm::MemoryAccess*, bool) MemorySSAUpdater.cpp:1329
    #4 0x112e3d04f in (anonymous namespace)::eliminateDeadStoresMemorySSA(llvm::Function&, llvm::AAResults&, llvm::MemorySSA&, llvm::DominatorTree&, llvm::PostDominatorTree&, llvm::TargetLibraryInfo const&) DeadStoreElimination.cpp:1684
    #5 0x1121b2b64 in llvm::FPPassManager::runOnFunction(llvm::Function&) LegacyPassManager.cpp:1482
    #6 0x1121b36cb in llvm::FPPassManager::runOnModule(llvm::Module&) LegacyPassManager.cpp:1518
    #7 0x1121b449f in llvm::legacy::PassManagerImpl::run(llvm::Module&) LegacyPassManager.cpp:1583
    #8 0x10e47a829 in main opt.cpp:940
    #9 0x7fff7dcae084 in start+0x0 (libdyld.dylib:x86_64+0x17084)

previously allocated by thread T0 here:
    #0 0x11f8ea22d in wrap__Znwm+0x7d (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x5222d)
    #1 0x1122f6f8b in llvm::User::operator new(unsigned long, unsigned int) User.cpp:124
    #2 0x1110baf4f in llvm::MemoryUseOrDef* llvm::MemorySSA::createNewAccess<llvm::BatchAAResults>(llvm::Instruction*, llvm::BatchAAResults*, llvm::MemoryUseOrDef const*) MemorySSA.h:389
    #3 0x1110b3ee1 in llvm::MemorySSA::buildMemorySSA(llvm::BatchAAResults&) MemorySSA.cpp:1528
    #4 0x1110b366d in llvm::MemorySSA::MemorySSA(llvm::Function&, llvm::AAResults*, llvm::DominatorTree*) MemorySSA.cpp:1235
    #5 0x1110c3374 in llvm::MemorySSAWrapperPass::runOnFunction(llvm::Function&) MemorySSA.cpp:1227
    #6 0x1121b2b64 in llvm::FPPassManager::runOnFunction(llvm::Function&) LegacyPassManager.cpp:1482
    #7 0x1121b36cb in llvm::FPPassManager::runOnModule(llvm::Module&) LegacyPassManager.cpp:1518
    #8 0x1121b449f in llvm::legacy::PassManagerImpl::run(llvm::Module&) LegacyPassManager.cpp:1583
    #9 0x10e47a829 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
==44520==ABORTING
Stack dump:
0.	Program arguments: /Users/buildslave/jenkins/workspace/clang-stage2-cmake-RgSan/clang-build/bin/opt -S -dse -enable-dse-memoryssa 
1.	Running pass 'Function Pass Manager' on module '<stdin>'.
2.	Running pass 'Dead Store Elimination' on function '@dse'
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/int_sideeffect.ll

--