llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

MachineScheduler: "No live value at use." assert

Open MatzeB opened this issue 10 years ago • 5 comments

Bugzilla Link 27106
Version trunk
OS All
Attachments reproducer
CC @nhaehnle,@JonPsson,@qcolombet

Extended Description

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.

MatzeB avatar Mar 29 '16 05:03 MatzeB

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

JonPsson avatar Oct 26 '19 08:10 JonPsson

Ping!

Saw this again in testing. At least my test case of 2018-10-06 is still failing.

JonPsson avatar Jun 01 '19 22:06 JonPsson

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

JonPsson avatar Oct 06 '18 08:10 JonPsson

r264696 fixes the second part mentioned in comment #​1

MatzeB avatar Mar 29 '16 05:03 MatzeB

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.

MatzeB avatar Mar 29 '16 05:03 MatzeB