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

Cyclic PHI nodes prevent NewGVN from converging.

Open llvmbot opened this issue 9 years ago • 3 comments

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.

llvmbot avatar Oct 12 '17 23:10 llvmbot

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.

llvmbot avatar Oct 13 '17 00:10 llvmbot

assigned to @fhahn

llvmbot avatar Oct 12 '17 23:10 llvmbot

It seems to have been fixed in the meantime. https://godbolt.org/z/heYfzdKh3 @alinas @nunoplopes

ManuelJBrito avatar Jul 14 '24 09:07 ManuelJBrito