about summary refs log tree commit diff
path: root/tests/codegen/enum
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-08-12 10:20:00 +0000
committerbors <bors@rust-lang.org>2024-08-12 10:20:00 +0000
commite08b80c0fb7667bdcd040761891701e576c42ec8 (patch)
tree41829149ea710de2b1887e98c1b1358559fba03f /tests/codegen/enum
parent1d8f135b20fac63c493d5963ce02963b46ca0986 (diff)
parentcfadfabfcd9644628422396fcc8a67244df435c1 (diff)
downloadrust-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/enum')
-rw-r--r--tests/codegen/enum/enum-match.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/codegen/enum/enum-match.rs b/tests/codegen/enum/enum-match.rs
index 8da5de63e67..a24b98050d2 100644
--- a/tests/codegen/enum/enum-match.rs
+++ b/tests/codegen/enum/enum-match.rs
@@ -34,7 +34,7 @@ pub enum Enum1 {
 
 // CHECK: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @match1{{.*}}
 // CHECK-NEXT: start:
-// CHECK-NEXT: %1 = add i8 %0, -2
+// CHECK-NEXT: %1 = add{{( nsw)?}} i8 %0, -2
 // CHECK-NEXT: %2 = zext i8 %1 to i64
 // CHECK-NEXT: %3 = icmp ult i8 %1, 2
 // CHECK-NEXT: %4 = add nuw nsw i64 %2, 1