diff options
| author | bors <bors@rust-lang.org> | 2024-08-12 10:20:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-12 10:20:00 +0000 |
| commit | e08b80c0fb7667bdcd040761891701e576c42ec8 (patch) | |
| tree | 41829149ea710de2b1887e98c1b1358559fba03f /tests/codegen/function-arguments.rs | |
| parent | 1d8f135b20fac63c493d5963ce02963b46ca0986 (diff) | |
| parent | cfadfabfcd9644628422396fcc8a67244df435c1 (diff) | |
| download | rust-e08b80c0fb7667bdcd040761891701e576c42ec8.tar.gz rust-e08b80c0fb7667bdcd040761891701e576c42ec8.zip | |
Auto merge of #128371 - andjo403:rangeAttribute, r=nikic
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.
Diffstat (limited to 'tests/codegen/function-arguments.rs')
| -rw-r--r-- | tests/codegen/function-arguments.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/codegen/function-arguments.rs b/tests/codegen/function-arguments.rs index 56504df4034..bf9f405192b 100644 --- a/tests/codegen/function-arguments.rs +++ b/tests/codegen/function-arguments.rs @@ -50,7 +50,7 @@ pub fn maybeuninit_enum_bool(x: MaybeUninit<MyBool>) -> MaybeUninit<MyBool> { x } -// CHECK: noundef i32 @char(i32 noundef %x) +// CHECK: noundef{{( range\(i32 0, 1114112\))?}} i32 @char(i32 noundef{{( range\(i32 0, 1114112\))?}} %x) #[no_mangle] pub fn char(x: char) -> char { x @@ -68,7 +68,7 @@ pub fn int(x: u64) -> u64 { x } -// CHECK: noundef i64 @nonzero_int(i64 noundef %x) +// CHECK: noundef{{( range\(i64 1, 0\))?}} i64 @nonzero_int(i64 noundef{{( range\(i64 1, 0\))?}} %x) #[no_mangle] pub fn nonzero_int(x: NonZero<u64>) -> NonZero<u64> { x @@ -250,7 +250,7 @@ pub fn return_slice(x: &[u16]) -> &[u16] { x } -// CHECK: { i16, i16 } @enum_id_1(i16 noundef %x.0, i16 %x.1) +// CHECK: { i16, i16 } @enum_id_1(i16 noundef{{( range\(i16 0, 3\))?}} %x.0, i16 %x.1) #[no_mangle] pub fn enum_id_1(x: Option<Result<u16, u16>>) -> Option<Result<u16, u16>> { x |
