Cyclic PHI nodes prevent NewGVN from converging.
| Bugzilla Link | 34935 |
| Version | trunk |
| OS | All |
| Reporter | LLVM Bugzilla Contributor |
Extended Description
define void @patatino() { bb: br label %bb1
bb1: %tmp = phi i1 [ undef, %bb ], [ %tmp3, %bb1 ] %tmp3 = and i1 %tmp, true br label %bb1 }
This is the bug that we think we defeated, many times, and instead, keeps coming back. NewGVN keeps moving instructions between classes and never reaches convergence. Eventually we hit an assertion because we processed an instruction too many times.
I'll take a stab at debugging it, but this is a FYI.
This is caused by the same bug that is making me fix the rest of cycle finding. It's a dupe of 34472.
If you replace return lookupOperandLeader(P.first) != I with return true, you will see it converges.
assigned to @fhahn
It seems to have been fixed in the meantime. https://godbolt.org/z/heYfzdKh3 @alinas @nunoplopes