rust/tests
bors 5f3b84a421 Auto merge of #137278 - heiseish:101210-extra-codegen-tests, r=scottmcm
added some new test to check for result and options opt

Apologies for the delay. Finally have some time to get back into contributing.

## Context
- Added some tests to show optimization on result and options for 64 and 128 bits
- Relevant issue https://github.com/rust-lang/rust/issues/101210

## Some newb questions from me
- [x] My local llvm IR has `nuw` in `result_nop_match_128` etc whereas [godbolt version](https://rust.godbolt.org/z/Td9zoT5zn) doesn't have. So I put optional there, but not sure if it's desirable (maybe I'm not using the compiled llvm in the repo). I ran the test with
```bash
./x test tests/codegen/try_question_mark_nop.rs
```
- [x] Unless I'm reading it wrongly, but `option_nop_match_128` and `option_nop_traits_128` look to be **not** optimized away?

Update:
Here's the test for future reference
```rust
// CHECK-LABEL: `@option_nop_match_128`
#[no_mangle]
pub fn option_nop_match_128(x: Option<i128>) -> Option<i128> {
    // CHECK: start:
    // CHECK-NEXT: %trunc = trunc nuw i128 %0 to i1
    // CHECK-NEXT: br i1 %trunc, label %bb3, label %bb4
    // CHECK: bb3:
    // CHECK-NEXT: %2 = getelementptr inbounds {{(nuw )?}}i8, ptr %_0, i64 16
    // CHECK-NEXT: store i128 %1, ptr %2, align 16
    // CHECK: bb4:
    // CHECK-NEXT: %storemerge = phi i128 [ 1, %bb3 ], [ 0, %start ]
    // CHECK-NEXT: store i128 %storemerge, ptr %_0, align 16
    // CHECK-NEXT: ret void
    match x {
        Some(x) => Some(x),
        None => None,
    }
}
```

r? `@scottmcm`
2025-03-16 05:17:07 +00:00
..
assembly Rollup merge of #137816 - folkertdev:naked-asm-xcoff, r=Noratrieb 2025-03-13 11:28:20 +01:00
auxiliary tests: use minicore more 2025-02-24 09:26:54 +00:00
codegen Auto merge of #137278 - heiseish:101210-extra-codegen-tests, r=scottmcm 2025-03-16 05:17:07 +00:00
codegen-units
coverage coverage: Add some more cases to tests/coverage/holes.rs 2025-02-19 13:56:20 +11:00
coverage-run-rustdoc
crashes EUV: fix place of deref pattern's interior's scrutinee 2025-03-13 01:01:26 -07:00
debuginfo Rollup merge of #137967 - mustartt:fix-aix-test-hangs, r=workingjubilee 2025-03-11 13:30:50 +01:00
incremental remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
mir-opt Don't drop Rvalue::WrapUnsafeBinder during GVN 2025-03-15 18:10:55 +00:00
pretty Fix HIR param pretty printing some more. 2025-03-14 09:45:41 +11:00
run-make Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
rustdoc Add RTN support to rustdoc 2025-03-15 18:13:27 +00:00
rustdoc-gui Rollup merge of #137539 - GuillaumeGomez:copy-content-tests, r=notriddle 2025-02-25 13:07:34 +01:00
rustdoc-js
rustdoc-js-std Remove the common prelude module 2025-02-11 13:04:27 -08:00
rustdoc-json Add RTN support to rustdoc 2025-03-15 18:13:27 +00:00
rustdoc-ui Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
ui Rollup merge of #138484 - xizheyin:issue-138392, r=compiler-errors 2025-03-16 09:40:10 +08:00
ui-fulldeps Make opts.maybe_sysroot non-optional 2025-03-12 15:05:24 +00:00
COMPILER_TESTS.md