LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 908 - LICM crash, "Uses remain when a value is destroyed"
Summary: LICM crash, "Uses remain when a value is destroyed"
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Loop Optimizer (show other bugs)
Version: trunk
Hardware: All All
: P normal
Assignee: Chris Lattner
URL:
Keywords: compile-fail
Depends on:
Blocks:
 
Reported: 2006-09-12 10:08 PDT by Nick Lewycky
Modified: 2018-11-07 00:17 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments
simplified testcase (1.65 KB, application/octet-stream)
2006-09-12 10:08 PDT, Nick Lewycky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Lewycky 2006-09-12 10:08:20 PDT
MultiSource/Applications/oggenc picked up a failure in the nightly run. It
appears to be in the loop invariant code motion pass. Here's what happens:

$ ~/llvm/Debug/bin/opt -licm bugpoint-reduced-simplified.bc
WARNING: You're attempting to print out a bytecode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bytecode first-hand, you
can force output with the `-f' option.

While deleting: uint %tmp16.i
Use still stuck around after Def is destroyed:  %exitcond155 = seteq uint 0,
%tmp16.i           ; <bool> [#uses=0]

opt: Value.cpp:59: virtual llvm::Value::~Value(): Assertion `use_begin() ==
use_end() && "Uses remain when a value is destroyed!"' failed.
/home/nicholas/llvm/Debug/bin/opt((anonymous
namespace)::PrintStackTrace()+0x1a)[0x873245c]
/home/nicholas/llvm/Debug/bin/opt((anonymous
namespace)::SignalHandler(int)+0x110)[0x8732720]
[0xffffe500]
Aborted
Comment 1 Nick Lewycky 2006-09-12 10:08:54 PDT
Created attachment 385 [details]
simplified testcase
Comment 2 Chris Lattner 2006-09-12 14:18:31 PDT
Fixed.  Testcase here: 
Transforms/LICM/2006-09-12-DeadUserOfSunkInstr.ll

Patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060911/037730.html

Thanks!

-Chris
Comment 3 Nick Lewycky 2006-09-12 21:47:39 PDT
Verified. Thanks Chris!