https://bugs.freedesktop.org/show_bug.cgi?id=90056
--- Comment #10 from Andy Furniss adf.lists@gmail.com --- (In reply to Grigori Goronzy from comment #9)
Created attachment 115409 [details] [review] Full shader
That does not help either. Seems to break the SSA somehow. Full shader that triggers the bug attached.
The patch I posted earlier help with the the reduced testcase, but not with the full shader. Both undef incoming values in phi nodes and undef branch conditions cause problems in different ways.
With the second patch + valley I get -
valley_x64: LiveVariables.cpp:114: void llvm::LiveVariables::MarkVirtRegAliveInBlock(llvm::LiveVariables::VarInfo &, llvm::MachineBasicBlock *, llvm::MachineBasicBlock *, std::vector<MachineBasicBlock *> &): Assertion `MBB != &MF->front() && "Can't find reaching def for virtreg"' failed.