-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add FileCheck annotations to dataflow-const-prop tests #119759
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
1eaeaaf
Add FileCheck for array_index.rs, boolean_identities.rs and cast.rs
sfzhu93 e05c779
Add FileCheck for checked.rs and default_boxed_slice.rs.
sfzhu93 33e5d85
Add FileCheck for enum.rs
sfzhu93 24aefa0
Add FileCheck for if.rs, inherit_overflow.rs, issue_81605.rs
sfzhu93 9452d7e
Add FileCheck to 3 tests: large_array_index, mult_by_zero, and offset_of
sfzhu93 e9152e2
Add FileCheck to 3 tests: ref_without_sb, repeat, repr_transparent
sfzhu93 3ab1d5d
Add FileCheck to 3 tests: self_assign_add, self_assign, and sibling_ptr
sfzhu93 d765e3a
Add FileCheck to slice_len.rs
sfzhu93 732f6a1
Add FileCheck to struct.rs
sfzhu93 1adda9a
Add FileCheck to terminator.rs and tuple.rs
sfzhu93 7135168
Add FileCheck for enum.rs
sfzhu93 d63f10b
resolve code reviews
sfzhu93 1c886d7
resolve code reviews
sfzhu93 cd77d59
update enum.rs for code review
sfzhu93 5747ece
add FIXME for default_boxed_slice.rs
sfzhu93 edba949
update misuse of check-label
sfzhu93 7ad307d
finish a pattern in `enum.rs`
sfzhu93 65b1083
update enum.rs
sfzhu93 699b59c
update terminator.rs
sfzhu93 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
// skip-filecheck | ||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY | ||
// unit-test: DataflowConstProp | ||
// EMIT_MIR_FOR_EACH_BIT_WIDTH | ||
|
||
// EMIT_MIR array_index.main.DataflowConstProp.diff | ||
|
||
// CHECK-LABEL: fn main() -> () { | ||
fn main() { | ||
// CHECK: let mut [[array_lit:_.*]]: [u32; 4]; | ||
// CHECK: debug x => [[x:_.*]]; | ||
|
||
let x: u32 = [0, 1, 2, 3][2]; | ||
// CHECK: bb{{[0-9]+}}: { | ||
// CHECK: [[array_lit]] = [const 0_u32, const 1_u32, const 2_u32, const 3_u32]; | ||
// CHECK: [[index:_.*]] = const 2_usize; | ||
// CHECK: bb{{[0-9]+}}: { | ||
// CHECK-NOT: [[x]] = [[array_lit]][[[index]]]; | ||
// CHECK: [[x]] = [[array_lit]][2 of 3]; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
// skip-filecheck | ||
// unit-test: DataflowConstProp | ||
|
||
// EMIT_MIR boolean_identities.test.DataflowConstProp.diff | ||
|
||
// CHECK-LABEL: fn test( | ||
pub fn test(x: bool, y: bool) -> bool { | ||
(y | true) & (x & false) | ||
// CHECK: _0 = const false; | ||
sfzhu93 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
// CHECK-LABEL: fn main( | ||
fn main() { | ||
test(true, false); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
// skip-filecheck | ||
// unit-test: DataflowConstProp | ||
|
||
// EMIT_MIR cast.main.DataflowConstProp.diff | ||
|
||
// CHECK-LABEL: fn main( | ||
fn main() { | ||
// CHECK: debug a => [[a:_.*]]; | ||
// CHECK: debug b => [[b:_.*]]; | ||
|
||
// CHECK: [[a]] = const 257_i32; | ||
let a = 257; | ||
// CHECK: [[b]] = const 2_u8; | ||
let b = a as u8 + 1; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,30 @@ | ||
// skip-filecheck | ||
// unit-test: DataflowConstProp | ||
// compile-flags: -Coverflow-checks=on | ||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY | ||
|
||
// EMIT_MIR checked.main.DataflowConstProp.diff | ||
#[allow(arithmetic_overflow)] | ||
|
||
// CHECK-LABEL: fn main( | ||
fn main() { | ||
// CHECK: debug a => [[a:_.*]]; | ||
// CHECK: debug b => [[b:_.*]]; | ||
// CHECK: debug c => [[c:_.*]]; | ||
// CHECK: debug d => [[d:_.*]]; | ||
// CHECK: debug e => [[e:_.*]]; | ||
|
||
// CHECK: [[a]] = const 1_i32; | ||
let a = 1; | ||
|
||
// CHECK: [[b]] = const 2_i32; | ||
let b = 2; | ||
|
||
// CHECK: [[c]] = const 3_i32; | ||
let c = a + b; | ||
|
||
// CHECK: [[d]] = const _; | ||
let d = i32::MAX; | ||
|
||
// CHECK: [[e]] = const i32::MIN; | ||
let e = d + 1; | ||
sfzhu93 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.