about summary refs log tree commit diff
path: root/tests/codegen/issues
AgeCommit message (Collapse)AuthorLines
2024-12-19Explicitly register `MSVC`/`NONMSVC` revisions for some codegen tests许杰友 Jieyou Xu (Joe)-19/+28
2024-12-17Use field init shorthand where possibleJosh Triplett-1/+1
Field init shorthand allows writing initializers like `tcx: tcx` as `tcx`. The compiler already uses it extensively. Fix the last few places where it isn't yet used.
2024-12-05Adapt codegen tests for NUW inferenceTim Neumann-8/+8
2024-12-03Auto merge of #104342 - mweber15:add_file_location_to_more_types, r=wesleywiserbors-0/+112
Require `type_map::stub` callers to supply file information This change attaches file information (`DIFile` reference and line number) to struct debug info nodes. Before: ``` ; foo.ll ... !5 = !DIFile(filename: "<unknown>", directory: "") ... !16 = !DICompositeType(tag: DW_TAG_structure_type, name: "MyType", scope: !2, file: !5, size: 32, align: 32, elements: !17, templateParams: !19, identifier: "4cb373851db92e732c4cb5651b886dd0") ... ``` After: ``` ; foo.ll ... !3 = !DIFile(filename: "foo.rs", directory: "/home/matt/src/rust98678", checksumkind: CSK_SHA1, checksum: "bcb9f08512c8f3b8181ef4726012bc6807bc9be4") ... !16 = !DICompositeType(tag: DW_TAG_structure_type, name: "MyType", scope: !2, file: !3, line: 3, size: 32, align: 32, elements: !17, templateParams: !19, identifier: "9e5968c7af39c148acb253912b7f409f") ... ``` Fixes #98678 r? `@wesleywiser`
2024-12-02Fix tests when using MinGWMatt Weber-4/+4
2024-11-28Share inline(never) generics across cratesMark Rousskov-1/+4
This reduces code sizes and better respects programmer intent when marking inline(never). Previously such a marking was essentially ignored for generic functions, as we'd still inline them in remote crates.
2024-11-06Fix relative lines in coroutine testMatt Weber-2/+2
2024-11-06Use -DAG to handle use of file before definitionWesley Wiser-4/+4
Also fixup the test assertion for msvc and unix
2024-11-06Restructure `compile-flags` for testsMatt Weber-12/+8
Optimization needs to be explicitly disabled now.
2024-11-06Update compile flags formattingMatt Weber-5/+5
2024-11-06Rename generator test fileMatt Weber-7/+7
2024-11-06Rename option and add docMatt Weber-4/+4
2024-11-06Move additional source location info behind -Z optionMatt Weber-14/+15
2024-11-06Move tests into issues directoryMatt Weber-0/+115
2024-11-02Add a Few Codegen TestsVeera-0/+45
2024-10-21move strict provenance lints to new feature gate, remove old feature gatesRalf Jung-1/+0
2024-10-19Add codegen test for branchy bool matchclubby789-0/+27
2024-10-11Avoid superfluous UB checks in `IndexRange`Josh Stone-0/+5
`IndexRange::len` is justified as an overall invariant, and `take_prefix` and `take_suffix` are justified by local branch conditions. A few more UB-checked calls remain in cases that are only supported locally by `debug_assert!`, which won't do anything in distributed builds, so those UB checks may still be useful. We generally expect core's `#![rustc_preserve_ub_checks]` to optimize away in user's release builds, but the mere presence of that extra code can sometimes inhibit optimization, as seen in #131563.
2024-09-23Improve autovectorization of to_lowercase / to_uppercase functionsJörn Horstmann-0/+23
Refactor the code in the `convert_while_ascii` helper function to make it more suitable for auto-vectorization and also process the full ascii prefix of the string. The generic case conversion logic will only be invoked starting from the first non-ascii character. The runtime on microbenchmarks with ascii-only inputs improves between 1.5x for short and 4x for long inputs on x86_64 and aarch64. The new implementation also encapsulates all unsafe inside the `convert_while_ascii` function. Fixes #123712
2024-09-22tests: Remove spuriously failing vec-tryinto-array codegen testJubilee Young-22/+0
2024-09-20Rollup merge of #128209 - beetrees:no-macos-10.10, r=jieyouxuGuillaume Gomez-27/+0
Remove macOS 10.10 dynamic linker bug workaround Rust's current minimum macOS version is 10.12, so the hack can be removed. This PR also updates the `remove_dir_all` docs to reflect that all supported macOS versions are protected against TOCTOU race conditions (the fallback implementation was already removed in #127683). try-job: dist-x86_64-apple try-job: dist-aarch64-apple try-job: dist-apple-various try-job: aarch64-apple try-job: x86_64-apple-1
2024-09-18Update the minimum external LLVM to 18Josh Stone-2/+0
2024-09-04Remove macOS 10.10 dynamic linker bug workaroundbeetrees-27/+0
2024-08-31ignore/fix layout-sensitive testsThe 8472-0/+1
2024-08-14Rollup merge of #128759 - notriddle:notriddle/spec-to-string, ↵Matthias Krüger-0/+36
r=workingjubilee,compiler-errors alloc: add ToString specialization for `&&str` Fixes #128690
2024-08-12Auto merge of #128371 - andjo403:rangeAttribute, r=nikicbors-1/+1
Add range attribute to scalar function results and arguments as LLVM 19 adds the range attribute this starts to use it for better optimization. hade been interesting to see a perf run with the https://github.com/rust-lang/rust/pull/127513 closes https://github.com/rust-lang/rust/issues/50156 cc https://github.com/rust-lang/rust/issues/49572 shall be fixed but not possible to see as there is asserts that already trigger the optimization.
2024-08-11Add range attribute to scalar function results and argumentsAndreas Jonson-1/+1
2024-08-10Auto merge of #128584 - DianQK:tests-for-llvm-19, r=nikicbors-0/+67
Add a set of tests for LLVM 19 Close #107681. Close #118306. Close #126585. r? compiler
2024-08-08Add a set of tests for LLVM 19DianQK-0/+67
2024-08-06alloc: add ToString specialization for `&&str`Michael Howell-0/+36
Fixes #128690
2024-08-03Add test for updating enum discriminant through pointerclubby789-0/+19
2024-07-14reenable some windows testsklensy-1/+0
2024-07-12Auto merge of #123351 - beetrees:x86-ret-snan-rust, r=nikic,workingjubileebors-2/+8
Ensure floats are returned losslessly by the Rust ABI on 32-bit x86 Solves #115567 for the (default) `"Rust"` ABI. When compiling for 32-bit x86, this PR changes the `"Rust"` ABI to return floats indirectly instead of in x87 registers (with the exception of single `f32`s, which this PR returns in general purpose registers as they are small enough to fit in one). No change is made to the `"C"` ABI as that ABI requires x87 register usage and therefore will need a different solution.
2024-07-12Adjust tests for x86 "Rust" ABI changesbeetrees-2/+8
2024-06-19Give inlining bonuses to things that optimize outScott McMurray-1/+5
2024-06-14Auto merge of #125347 - tesuji:needtests, r=nikicbors-0/+176
Add codegen tests for E-needs-test close #36010 close #68667 close #74938 close #83585 close #93036 close #109328 close #110797 close #111508 close #112509 close #113757 close #120440 close #118392 close #71096 r? nikic
2024-06-11Make issue-122805.rs big endian compatibleNikita Popov-9/+12
Instead of not generating the function at all on big endian (which makes the CHECK lines fail), instead use to_le() on big endian, so that we essentially perform a bswap for both endiannesses.
2024-06-11Fix tests for 32 bits targetsLzu Tao-4/+4
2024-06-09Apply suggestions from code reviewLzu Tao-41/+25
Co-authored-by: Nikita Popov <github@npopov.com>
2024-06-09add codegen test for #36010Lzu Tao-0/+29
2024-06-09add codegen test for #68667Lzu Tao-0/+17
2024-06-09add codegen test for #74938Lzu Tao-0/+15
2024-06-09add codegen test for #93036Lzu Tao-0/+18
2024-06-09add codegen test for #109328Lzu Tao-0/+17
2024-06-09add codegen test for #110797Lzu Tao-0/+27
2024-06-09Add codegen test for #111508Lzu Tao-0/+22
2024-06-09add codegen test for #112509Lzu Tao-0/+17
2024-06-09add codegen test for #113757Lzu Tao-0/+19
2024-06-09add codegen test for issue-118392, 71096Lzu Tao-0/+11
2024-05-31Run rustfmt on `tests/codegen/`.Nicholas Nethercote-89/+58
Except for `simd-intrinsic/`, which has a lot of files containing multiple types like `u8x64` which really are better when hand-formatted. There is a surprising amount of two-space indenting in this directory. Non-trivial changes: - `rustfmt::skip` needed in `debug-column.rs` to preserve meaning of the test. - `rustfmt::skip` used in a few places where hand-formatting read more nicely: `enum/enum-match.rs` - Line number adjustments needed for the expected output of `debug-column.rs` and `coroutine-debug.rs`.