-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
-indvars pass fails to replace exit value of loop when profitable #1551
Comments
assigned to @lattner |
Another obvious case: int main() { |
*** Bug llvm/llvm-bugzilla-archive#1232 has been marked as a duplicate of this bug. *** |
This regression is largely due to LCSSA landing. For example, the input to indvars on the code in define i32 @foo() { bb5: ; preds = %bb5, %entry bb7: ; preds = %bb5 the LCSSA phi node prevents exit value substitution due to IndVarSimplify.cpp:347 -Chris |
Implemented. Patch here: Testcases here: test/Transforms/IndVarsSimplify/loop_evaluate_[234].ll -Chris |
mentioned in issue llvm/llvm-bugzilla-archive#1232 |
…m#1551) system_clock intrinsic calls with dynamically optional arguments Modify intrinsic system_clock calls to allow for an argument that is optional or a disassociated pointer or an unallocated allocatable. A call with such an argument is the same as a call that does not specify that argument. Rename (genIsNotNull -> genIsNotNullAddr) and (genIsNull -> genIsNullAddr) and add a use of genIsNotNullAddr.
…4/0b339c069266b7a4f3c82f80067d74620cbe19c4 [lldb] Inform every language runtime of the modified modules
Extended Description
The -indvars pass is not computing the exit value of j in either of these cases:
int ltst(int x) {
int i, j;
j=0;
for(i=0; i<x; i++)j++;
return(j);
}
int ltst(int x) {
int i = 0, j = 0
do {
j++, i++;
} while (i < x);
return(j);
}
The text was updated successfully, but these errors were encountered: