-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isGuaranteedNotToBeUndefOrPoison
is taking too long to execute
#130110
Milestone
Comments
dianqk
added a commit
that referenced
this issue
Mar 6, 2025
…`isGuaranteedNotToBeUndefOrPoison` (#130111) Fixes (keep it open) #130110. If the incoming value is PHI itself, we can skip this. If we can guarantee that the other incoming values are neither undef nor poison, then we can also guarantee that the value isn't either. If we cannot guarantee that, it makes no sense in calculating it.
/cherry-pick 462eb7e |
/pull-request #130474 |
swift-ci
pushed a commit
to swiftlang/llvm-project
that referenced
this issue
Mar 12, 2025
…`isGuaranteedNotToBeUndefOrPoison` (llvm#130111) Fixes (keep it open) llvm#130110. If the incoming value is PHI itself, we can skip this. If we can guarantee that the other incoming values are neither undef nor poison, then we can also guarantee that the value isn't either. If we cannot guarantee that, it makes no sense in calculating it. (cherry picked from commit 462eb7e)
jph-13
pushed a commit
to jph-13/llvm-project
that referenced
this issue
Mar 21, 2025
…`isGuaranteedNotToBeUndefOrPoison` (llvm#130111) Fixes (keep it open) llvm#130110. If the incoming value is PHI itself, we can skip this. If we can guarantee that the other incoming values are neither undef nor poison, then we can also guarantee that the value isn't either. If we cannot guarantee that, it makes no sense in calculating it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using the script can reproduce this:
./gen.sh 50 | opt -passes=instsimplify --disable-output
This is primarily due to a recursive check we're performing on a phi node that contains itself:
%nonpoison = phi i64 [ 0, %start ], [ %nonpoison, %bb0 ], [ %nonpoison, %bb1 ], [ %nonpoison, %bb2 ], [ %nonpoison, %bb3 ], ..., [ %nonpoison, %bbn ], [ %nonpoison, %bb ], [ %i, %back_to_loop ]
.The following code explains why returning true after exceeding the recursion depth:
llvm-project/llvm/lib/Analysis/ValueTracking.cpp
Lines 7885 to 7889 in d6c0839
The text was updated successfully, but these errors were encountered: