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 27106 - MachineScheduler: "No live value at use." assert
Summary: MachineScheduler: "No live value at use." assert
Status: NEW
Alias: None
Product: libraries
Classification: Unclassified
Component: Common Code Generator Code (show other bugs)
Version: trunk
Hardware: PC All
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-28 22:35 PDT by Matthias Braun
Modified: 2019-10-26 01:35 PDT (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments
reproducer (20.69 KB, application/octet-stream)
2016-03-28 22:35 PDT, Matthias Braun
Details
New unreduced test case (295.25 KB, text/plain)
2018-10-06 01:03 PDT, Jonas Paulsson
Details
reduced testcase (2.63 KB, patch)
2019-10-26 01:35 PDT, Jonas Paulsson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Braun 2016-03-28 22:35:35 PDT
Created attachment 16109 [details]
reproducer

r262767 triggered the "No live value at use." assert in the MachineScheduler for the attached testcase reported by Nicolai Hähnle-Montoro.

See also http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160321/341496.html and previous mails.
Comment 1 Matthias Braun 2016-03-28 22:42:17 PDT
Here's a status update: Interestingly this testcase exhibits two problems:

- The register coalescer producing invalid live ranges when the removal of a COPY uncovers hidden dead defs (which would mean we have to shrink the liverange instead of forming the union of the src and dst register liverange). This is addressed by this new pass that detects hidden dead defs+uses early: http://reviews.llvm.org/D18427

- There's a second problem where RegisterPressure tracker was accidentally tracking subregister lane liveness in a subreg enabled target even though lanemask tracking in the MachineScheduler was not enabled yet. This led to subtle inconcsistencies. I have a patch for that which I will commit after some cleanup.
Comment 2 Matthias Braun 2016-03-28 22:55:48 PDT
r264696 fixes the second part mentioned in comment #1
Comment 3 Jonas Paulsson 2018-10-06 01:03:25 PDT
Created attachment 20971 [details]
New unreduced test case

bin/clang -O3 -march=z13 crash5.i -o a.out -w -mllvm -disable-machine-dce -mllvm -disable-cgp -mllvm -enable-simple-loop-unswitch -mllvm -disable-basicaa
Comment 4 Jonas Paulsson 2019-06-01 15:35:03 PDT
Ping!

Saw this again in testing. At least my test case of 2018-10-06 is still failing.
Comment 5 Jonas Paulsson 2019-10-26 01:35:22 PDT
Created attachment 22735 [details]
reduced testcase

This is a very small test case that might be nice to look at for this:

llc -O3 -mcpu=z15 tc_vni.mir -o - -misched=ilpmax -start-before=simple-register-coalescing