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
SCEV::createNodeForPhi flags an AddRec expression as NSW if the value on the backedge is flagged nsw. It disregards whether the value has the same form as the expression, or is merely a subexression as in:
%i.0 = phi i32 [ 0, %pre ], [ %tmp3, %loop ] %tmp2 = add i32 %i.0, 1 %tmp3 = add nsw i32 %tmp2, 1 %check = icmp slt i32 %i.0, %N
A unit test is attached. It could be appended to nsw.ll.
I believe it would be sufficient to test if one of the BEValue's operands is the PHINode before propagating NSW without losing any important cases.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
atrick commentedOct 3, 2013
Extended Description
SCEV::createNodeForPhi flags an AddRec expression as NSW if the value on the backedge is flagged nsw. It disregards whether the value has the same form as the expression, or is merely a subexression as in:
A unit test is attached. It could be appended to nsw.ll.
I believe it would be sufficient to test if one of the BEValue's operands is the PHINode before propagating NSW without losing any important cases.
The text was updated successfully, but these errors were encountered: