about summary refs log tree commit diff
path: root/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyArmIdentity.diff
AgeCommit message (Collapse)AuthorLines
2020-07-29add crate name to mir dumpsXavier Denis-98/+0
2020-07-27mv std libs to library/mark-13/+13
2020-07-02Fix debuginfo so that it points to the correct localWesley Wiser-28/+35
2020-07-02[mir-opt] Prevent mis-optimization when SimplifyArmIdentity runsWesley Wiser-25/+23
If temporaries are used beyond just the temporary chain, then we can't optimize out the reads and writes.
2020-06-26Show the values and computation that would overflow a const evaluation or ↵Oliver Scherer-1/+1
propagation
2020-06-04further bless tests.Felix S. Klock II-1/+1
2020-05-11Modify SimplifyArmIdentity so it can trigger on mir-opt-level=1Wesley Wiser-15/+38
I also added test cases to make sure the optimization can fire on all of these cases: ```rust fn case_1(o: Option<u8>) -> Option<u8> { match o { Some(u) => Some(u), None => None, } } fn case2(r: Result<u8, i32>) -> Result<u8, i32> { match r { Ok(u) => Ok(u), Err(i) => Err(i), } } fn case3(r: Result<u8, i32>) -> Result<u8, i32> { let u = r?; Ok(u) } ``` Without MIR inlining, this still does not completely optimize away the `?` operator because the `Try::into_result()`, `From::from()` and `Try::from_error()` calls still exist. This does move us a bit closer to that goal though because: - We can now run the pass on mir-opt-level=1 - We no longer depend on the copy propagation pass running which is unlikely to stabilize anytime soon.
2020-05-09Bless mir-opt testsMatthew Jasper-1/+1
2020-04-27Emit basic block ids for statements and terminators in MIR only in -Zverbose ↵Oliver Scherer-17/+17
mode
2020-04-07Normalize away pairs of line:col numbers.Ana-Maria Mihalache-8/+8
2020-04-07--bless all mir-opt tests.Ana-Maria Mihalache-0/+70