-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[DA] Check for overflow in strong SIV test #166223
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,19 +12,24 @@ | |
| ; A[2*i - 4] = 2; | ||
| ; } | ||
| ; | ||
| ; FIXME: DependenceAnalysis currently detects no dependency between the two | ||
| ; stores, but it does exist. For example, each store will access A[0] when i | ||
| ; is 1 and 2 respectively. | ||
| ; The root cause is that the product of the BTC and the coefficient | ||
| ; ((1LL << 62) - 1 and 2) overflows in a signed sense. | ||
|
Comment on lines
-15
to
-19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did you rewrite this comment? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because now the issue that has been mentioned in the comment regarding the overflow in the product of the BTC and the coefficient is resolved. By this patch, Strong SIV is generating the expected output There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test is not the same as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure what you mean. Please clarify your comment on this change. No it is not same as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
But the comment is now saying There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for noticing. Overlooked it. Now it is fixed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't seem to be fixed. Maybe forget to commit? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Committed now. |
||
| ; FIXME: DependenceAnalysis fails to detect the dependency between the two | ||
| ; stores, and the issue is not caused by the Strong SIV. | ||
| define void @strongsiv_const_ovfl(ptr %A) { | ||
| ; CHECK-LABEL: 'strongsiv_const_ovfl' | ||
| ; CHECK-NEXT: Src: store i8 1, ptr %gep.0, align 1 --> Dst: store i8 1, ptr %gep.0, align 1 | ||
| ; CHECK-NEXT: da analyze - none! | ||
| ; CHECK-NEXT: Src: store i8 1, ptr %gep.0, align 1 --> Dst: store i8 2, ptr %gep.1, align 1 | ||
| ; CHECK-NEXT: da analyze - none! | ||
| ; CHECK-NEXT: Src: store i8 2, ptr %gep.1, align 1 --> Dst: store i8 2, ptr %gep.1, align 1 | ||
| ; CHECK-NEXT: da analyze - none! | ||
| ; CHECK-ALL-LABEL: 'strongsiv_const_ovfl' | ||
| ; CHECK-ALL-NEXT: Src: store i8 1, ptr %gep.0, align 1 --> Dst: store i8 1, ptr %gep.0, align 1 | ||
| ; CHECK-ALL-NEXT: da analyze - none! | ||
| ; CHECK-ALL-NEXT: Src: store i8 1, ptr %gep.0, align 1 --> Dst: store i8 2, ptr %gep.1, align 1 | ||
| ; CHECK-ALL-NEXT: da analyze - none! | ||
| ; CHECK-ALL-NEXT: Src: store i8 2, ptr %gep.1, align 1 --> Dst: store i8 2, ptr %gep.1, align 1 | ||
| ; CHECK-ALL-NEXT: da analyze - none! | ||
| ; | ||
| ; CHECK-STRONG-SIV-LABEL: 'strongsiv_const_ovfl' | ||
| ; CHECK-STRONG-SIV-NEXT: Src: store i8 1, ptr %gep.0, align 1 --> Dst: store i8 1, ptr %gep.0, align 1 | ||
| ; CHECK-STRONG-SIV-NEXT: da analyze - none! | ||
| ; CHECK-STRONG-SIV-NEXT: Src: store i8 1, ptr %gep.0, align 1 --> Dst: store i8 2, ptr %gep.1, align 1 | ||
| ; CHECK-STRONG-SIV-NEXT: da analyze - consistent output [1]! | ||
| ; CHECK-STRONG-SIV-NEXT: Src: store i8 2, ptr %gep.1, align 1 --> Dst: store i8 2, ptr %gep.1, align 1 | ||
| ; CHECK-STRONG-SIV-NEXT: da analyze - none! | ||
| ; | ||
| entry: | ||
| br label %loop.header | ||
|
|
@@ -64,5 +69,4 @@ exit: | |
| ret void | ||
| } | ||
| ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: | ||
| ; CHECK-ALL: {{.*}} | ||
| ; CHECK-STRONG-SIV: {{.*}} | ||
| ; CHECK: {{.*}} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does
Consistentneed to be set to false?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, otherwise we will add the
Consistentattribute to a few test cases that do not currently have this attribute. As you are also aware, the attributeConsistentseems to not be well defined. If it is true, we may need to try to remove it in other patches.