Camille GILLOT
d50f26e409
Const-prop pointers.
2024-02-09 21:06:23 +00:00
Ben Kimock
611c3cb561
Bless/fix tests
2024-02-08 19:56:30 -05:00
Matthias Krüger
2b259577aa
Rollup merge of #119759 - sfzhu93:master, r=cjgillot
...
Add FileCheck annotations to dataflow-const-prop tests
part of #116971 .
A few shadowing variable names are changed, so that it is easier to match the variable names in MIR using FileCheck syntax.
Also, there's a FIXME in [enum.rs](https://github.com/rust-lang/rust/pull/119759/files#diff-7621f55327838e489a95ac99ae1e6126b37c57aff582594e6bee9d7e7e56fc58 ) because the MIR looks suspicious to me. It has been explained in the comments.
r? cjgillot
2024-02-04 19:42:09 +01:00
sfzhu93
699b59c01d
update terminator.rs
2024-01-28 22:44:32 -08:00
sfzhu93
65b10839d6
update enum.rs
2024-01-22 17:34:49 -08:00
sfzhu93
7ad307dc9d
finish a pattern in enum.rs
2024-01-20 08:22:07 -08:00
sfzhu93
edba94907d
update misuse of check-label
2024-01-20 08:09:14 -08:00
George Bateman
803b810eac
Remove feature(offset_of) from tests
2024-01-19 20:38:51 +00:00
sfzhu93
5747eceef8
add FIXME for default_boxed_slice.rs
2024-01-14 22:35:00 -08:00
sfzhu93
cd77d59f97
update enum.rs for code review
2024-01-12 20:50:28 -08:00
sfzhu93
1c886d794c
resolve code reviews
2024-01-11 23:36:09 -08:00
sfzhu93
d63f10b7ad
resolve code reviews
2024-01-11 23:22:33 -08:00
Camille GILLOT
0aedd6e86f
Sandwich MIR optimizations between DSE.
2024-01-11 09:58:19 +00:00
sfzhu93
7135168d08
Add FileCheck for enum.rs
2024-01-08 21:58:01 -08:00
sfzhu93
1adda9a170
Add FileCheck to terminator.rs and tuple.rs
2024-01-08 20:21:23 -08:00
sfzhu93
732f6a1303
Add FileCheck to struct.rs
2024-01-08 20:21:06 -08:00
sfzhu93
d765e3ae1f
Add FileCheck to slice_len.rs
2024-01-08 20:20:53 -08:00
sfzhu93
3ab1d5d450
Add FileCheck to 3 tests: self_assign_add, self_assign, and sibling_ptr
2024-01-08 20:20:27 -08:00
sfzhu93
e9152e2b6c
Add FileCheck to 3 tests: ref_without_sb, repeat, repr_transparent
2024-01-08 20:19:59 -08:00
sfzhu93
9452d7ed1a
Add FileCheck to 3 tests: large_array_index, mult_by_zero, and offset_of
2024-01-08 20:18:59 -08:00
sfzhu93
24aefa0e5d
Add FileCheck for if.rs, inherit_overflow.rs, issue_81605.rs
2024-01-08 17:01:13 -08:00
sfzhu93
33e5d851a9
Add FileCheck for enum.rs
2024-01-07 22:03:42 -08:00
sfzhu93
e05c779ee3
Add FileCheck for checked.rs and default_boxed_slice.rs.
2024-01-07 21:16:55 -08:00
sfzhu93
1eaeaaf08b
Add FileCheck for array_index.rs, boolean_identities.rs and cast.rs
2024-01-07 21:16:22 -08:00
Camille GILLOT
2837727471
Replace legacy ConstProp by GVN.
2023-12-24 20:08:57 +00:00
Ralf Jung
29c95e98e3
also print 'immutable' flag
2023-12-07 17:46:36 +01:00
bors
3f1e30a0a5
Auto merge of #118077 - calebzulawski:sync-portable-simd-2023-11-19, r=workingjubilee
...
Portable SIMD subtree update
Syncs nightly to the latest changes from rust-lang/portable-simd
r? `@rust-lang/libs`
2023-12-02 18:04:01 +00:00
Caleb Zulawski
4d9607869a
Update std::simd usage and test outputs
2023-11-26 09:02:25 -05:00
bohan
fc87d6e23d
add track_caller for arith ops
2023-11-24 00:54:06 +08:00
George Bateman
9d6ce61376
Update MIR tests for offset_of
2023-10-31 23:26:02 +00:00
bors
59bb9505bc
Auto merge of #103208 - cjgillot:match-fake-read, r=oli-obk,RalfJung
...
Allow partially moved values in match
This PR attempts to unify the behaviour between `let _ = PLACE`, `let _: TY = PLACE;` and `match PLACE { _ => {} }`.
The logical conclusion is that the `match` version should not check for uninitialised places nor check that borrows are still live.
The `match PLACE {}` case is handled by keeping a `FakeRead` in the unreachable fallback case to verify that `PLACE` has a legal value.
Schematically, `match PLACE { arms }` in surface rust becomes in MIR:
```rust
PlaceMention(PLACE)
match PLACE {
// Decision tree for the explicit arms
arms,
// An extra fallback arm
_ => {
FakeRead(ForMatchedPlace, PLACE);
unreachable
}
}
```
`match *borrow { _ => {} }` continues to check that `*borrow` is live, but does not read the value.
`match *borrow {}` both checks that `*borrow` is live, and fake-reads the value.
Continuation of ~https://github.com/rust-lang/rust/pull/102256~ ~https://github.com/rust-lang/rust/pull/104844~
Fixes https://github.com/rust-lang/rust/issues/99180 https://github.com/rust-lang/rust/issues/53114
2023-10-27 18:51:43 +00:00
Camille GILLOT
ec28dc7aa7
Use PlaceMention
for match scrutinees.
2023-10-24 15:30:17 +00:00
Camille GILLOT
9c85dfa1d7
Tweak test to avoid platform dependency.
2023-10-24 15:16:57 +00:00
Camille GILLOT
8c1b039d48
Use a ConstValue instead.
2023-10-21 16:26:05 +00:00
Camille GILLOT
31d101093c
Generate ValTrees in DataflowConstProp.
2023-10-21 16:20:46 +00:00
Camille GILLOT
328192bff4
FileCheck transmute.
2023-10-19 15:51:54 +00:00
Camille GILLOT
4ff03cd1a4
Allow to run filecheck in mir-opt tests.
2023-10-19 15:51:52 +00:00
Camille GILLOT
1f90d857d7
Stop trying to preserve pretty-printing.
2023-10-16 19:15:28 +00:00
Camille GILLOT
0eb958a89b
Rebless.
2023-10-16 18:36:47 +00:00
Camille GILLOT
02424e4bc5
Normalize alloc-id in tests.
2023-10-16 16:29:35 +00:00
Camille GILLOT
e63d19c4dd
Remove mir::LocalDecl::internal.
2023-10-04 17:55:15 +00:00
Camille GILLOT
b8c8520725
Ignore debug-assertions in test.
2023-09-20 18:18:44 +00:00
Camille GILLOT
e76b7f226a
Do not create a DerefLen place for Box<[T]>
.
2023-09-20 16:07:03 +00:00
Camille GILLOT
7493ad0abe
Duplicate output for test.
2023-09-11 16:29:42 +00:00
Camille GILLOT
b851e554dd
Support CopyForDeref.
2023-09-11 16:29:41 +00:00
Camille GILLOT
82f0468009
Handle reading statics.
2023-09-11 16:29:41 +00:00
Camille GILLOT
6ad6b4381c
Support non-scalar constants.
2023-09-11 16:29:41 +00:00
Camille GILLOT
b7a925a7ce
Add test where slice is a const.
2023-09-07 15:59:05 +00:00
Camille GILLOT
f96c6e04cb
Propagate PlaceElem::Index.
2023-09-06 16:09:31 +00:00
Camille GILLOT
fc63543792
Support array length.
2023-09-06 16:05:04 +00:00