-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[nfc] Add tests for witness table size optimizations. #34995
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
Conversation
|
||
// CHECK-DAG: @"$sBi8_WV" = external global i8*, align 8 | ||
// CHECK-DAG: @"$sSo5EmptyVMn" = linkonce_odr hidden constant <{ i32, i32, i32, i32, i32, i32, i32, i32 }> <{ i32 131089, i32 trunc (i64 sub (i64 ptrtoint (<{ i32, i32, i32 }>* @"$sSoMXM" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32, i32, i32 }>, <{ i32, i32, i32, i32, i32, i32, i32, i32 }>* @"$sSo5EmptyVMn", i32 0, i32 1) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @5 to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32, i32, i32 }>, <{ i32, i32, i32, i32, i32, i32, i32, i32 }>* @"$sSo5EmptyVMn", i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (%swift.metadata_response (i64)* @"$sSo5EmptyVMa" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32, i32, i32 }>, <{ i32, i32, i32, i32, i32, i32, i32, i32 }>* @"$sSo5EmptyVMn", i32 0, i32 3) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ({ i32, i32, i16, i16, i32 }* @"$sSo5EmptyVMF" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32, i32, i32 }>, <{ i32, i32, i32, i32, i32, i32, i32, i32 }>* @"$sSo5EmptyVMn", i32 0, i32 4) to i64)) to i32), i32 0, i32 2, i32 0 }>, section "__TEXT,__const", align 4 | ||
// CHECK-DAG: @"$sSo5EmptyVMf" = linkonce_odr hidden constant <{ i8**, i64, <{ i32, i32, i32, i32, i32, i32, i32, i32 }>* }> <{ i8** @"$sBi8_WV", i64 512, <{ i32, i32, i32, i32, i32, i32, i32, i32 }>* @"$sSo5EmptyVMn" }>, align 8 |
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.
I'm not entirely sure that this is the correct (or portable) way to test this. It would probably be sufficient just to test line 9, 14, and 19.
@swift-ci please smoke test Linux. |
24d32ac
to
2530b95
Compare
@swift-ci please smoke test. |
@swift-ci please smoke test macOS. |
@swift-ci please smoke test Windows. |
Forgot to save the errors 😕 @swift-ci please smoke test Linux. |
2530b95
to
6ec369a
Compare
@swift-ci please smoke test. |
6ec369a
to
8c0b8eb
Compare
@swift-ci please smoke test. |
@swift-ci please test Windows. |
@swift-ci please test Windows platform. |
8c0b8eb
to
ec2e130
Compare
// that have the appropriate size/shape (for example, { i8 x 4 } -> i32). | ||
|
||
// These witness tables look very differnt on Windows so it doesn't make sense | ||
// to test them in the same file. |
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.
As the comment says, the witness tables appear fairly different on Windows, so I don't think it's feasible to test both platforms in the same file. If anyone disagrees, let me know and I'll investigate further / update the test.
@swift-ci please smoke test. |
No description provided.