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.
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.
r264696 fixes the second part mentioned in comment #1
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
Ping! Saw this again in testing. At least my test case of 2018-10-06 is still failing.
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