[llvm-bugs] [Bug 32129] New: LICM fails AssertingVH check

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 3 08:48:05 PST 2017


http://bugs.llvm.org/show_bug.cgi?id=32129

            Bug ID: 32129
           Summary: LICM fails AssertingVH check
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: igor at azulsystems.com
                CC: llvm-bugs at lists.llvm.org

Running this command: opt  -licm -loop-unswitch -licm tmp.ll

On the following test case:

declare void @llvm.experimental.guard(i1, ...)

define void @test() {
entry:
  br label %header

header:
  br label %loop

loop:
  %0 = icmp ult i32 0, 400
  call void (i1, ...) @llvm.experimental.guard(i1 %0, i32 9) [ "deopt"() ]
  br i1 undef, label %header, label %loop
}


Leads to the LICM crash:

While deleting: void %
An asserting value handle still pointed to this value!
UNREACHABLE executed at /Users/igor/Projects/llvm-svn/lib/IR/Value.cpp:830!
0  opt                      0x000000010b3438d8
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  opt                      0x000000010b343fd6 SignalHandler(int) + 454
2  libsystem_platform.dylib 0x00007fffd8f51bba _sigtramp + 26
3  libsystem_platform.dylib 0x0000000117f6a291 _sigtramp + 1057064689
4  libsystem_c.dylib        0x00007fffd8dd8420 abort + 129
5  opt                      0x000000010b2da817
llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 471
6  opt                      0x000000010adf2bb9
llvm::ValueHandleBase::ValueIsDeleted(llvm::Value*) + 1081
7  opt                      0x000000010adf243a llvm::Value::~Value() + 42
8  opt                      0x000000010ad7bdbe llvm::CallInst::~CallInst() + 14
9  opt                      0x000000010ad77971
llvm::Instruction::eraseFromParent() + 97
10 opt                      0x000000010b1480f0
llvm::sinkRegion(llvm::DomTreeNodeBase<llvm::BasicBlock>*, llvm::AAResults*,
llvm::LoopInfo*, llvm::DominatorTree*, llvm::TargetLibraryInfo*, llvm::Loop*,
ll
<truncated>

-- 
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/20170303/590f5769/attachment.html>


More information about the llvm-bugs mailing list