about summary refs log tree commit diff
path: root/tests/codegen-llvm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codegen-llvm')
-rw-r--r--tests/codegen-llvm/comparison-operators-2-struct.rs1
-rw-r--r--tests/codegen-llvm/comparison-operators-2-tuple.rs1
-rw-r--r--tests/codegen-llvm/enum/enum-aggregate.rs1
-rw-r--r--tests/codegen-llvm/enum/enum-discriminant-eq.rs1
-rw-r--r--tests/codegen-llvm/integer-cmp.rs36
-rw-r--r--tests/codegen-llvm/intrinsics/three_way_compare.rs1
-rw-r--r--tests/codegen-llvm/issues/and-masked-comparison-131162.rs1
-rw-r--r--tests/codegen-llvm/issues/issue-101082.rs1
-rw-r--r--tests/codegen-llvm/issues/issue-129795.rs1
-rw-r--r--tests/codegen-llvm/issues/iter-max-no-unwrap-failed-129583.rs1
-rw-r--r--tests/codegen-llvm/issues/looping-over-ne-bytes-133528.rs1
-rw-r--r--tests/codegen-llvm/option-niche-eq.rs1
-rw-r--r--tests/codegen-llvm/slice-last-elements-optimization.rs1
-rw-r--r--tests/codegen-llvm/swap-small-types.rs1
-rw-r--r--tests/codegen-llvm/try_question_mark_nop.rs31
-rw-r--r--tests/codegen-llvm/union-aggregate.rs1
16 files changed, 16 insertions, 65 deletions
diff --git a/tests/codegen-llvm/comparison-operators-2-struct.rs b/tests/codegen-llvm/comparison-operators-2-struct.rs
index e179066ebfd..d44f92f511b 100644
--- a/tests/codegen-llvm/comparison-operators-2-struct.rs
+++ b/tests/codegen-llvm/comparison-operators-2-struct.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -C opt-level=1
-//@ min-llvm-version: 20
 
 // The `derive(PartialOrd)` for a 2-field type doesn't override `lt`/`le`/`gt`/`ge`.
 // This double-checks that the `Option<Ordering>` intermediate values used
diff --git a/tests/codegen-llvm/comparison-operators-2-tuple.rs b/tests/codegen-llvm/comparison-operators-2-tuple.rs
index 6a7e489c82d..37a7c5dfdaf 100644
--- a/tests/codegen-llvm/comparison-operators-2-tuple.rs
+++ b/tests/codegen-llvm/comparison-operators-2-tuple.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -C opt-level=1 -Z merge-functions=disabled
-//@ min-llvm-version: 20
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen-llvm/enum/enum-aggregate.rs b/tests/codegen-llvm/enum/enum-aggregate.rs
index f58d7ef12b6..7d450a89e2e 100644
--- a/tests/codegen-llvm/enum/enum-aggregate.rs
+++ b/tests/codegen-llvm/enum/enum-aggregate.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -Copt-level=0 -Cno-prepopulate-passes
-//@ min-llvm-version: 19
 //@ only-64bit
 
 #![crate_type = "lib"]
diff --git a/tests/codegen-llvm/enum/enum-discriminant-eq.rs b/tests/codegen-llvm/enum/enum-discriminant-eq.rs
index a1ab5e5c6e2..68cd58643e8 100644
--- a/tests/codegen-llvm/enum/enum-discriminant-eq.rs
+++ b/tests/codegen-llvm/enum/enum-discriminant-eq.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -Copt-level=3 -Zmerge-functions=disabled
-//@ min-llvm-version: 20
 //@ only-64bit
 //@ revisions: LLVM20 LLVM21
 //@ [LLVM21] min-llvm-version: 21
diff --git a/tests/codegen-llvm/integer-cmp.rs b/tests/codegen-llvm/integer-cmp.rs
index 812fa8e4a42..2233a575f8e 100644
--- a/tests/codegen-llvm/integer-cmp.rs
+++ b/tests/codegen-llvm/integer-cmp.rs
@@ -1,9 +1,6 @@
 // This is test for more optimal Ord implementation for integers.
 // See <https://github.com/rust-lang/rust/issues/63758> for more info.
 
-//@ revisions: llvm-pre-20 llvm-20
-//@ [llvm-20] min-llvm-version: 20
-//@ [llvm-pre-20] max-llvm-major-version: 19
 //@ compile-flags: -C opt-level=3 -Zmerge-functions=disabled
 
 #![crate_type = "lib"]
@@ -13,50 +10,29 @@ use std::cmp::Ordering;
 // CHECK-LABEL: @cmp_signed
 #[no_mangle]
 pub fn cmp_signed(a: i64, b: i64) -> Ordering {
-    // llvm-20: call{{.*}} i8 @llvm.scmp.i8.i64
-    // llvm-pre-20: icmp slt
-    // llvm-pre-20: icmp ne
-    // llvm-pre-20: zext i1
-    // llvm-pre-20: select i1
+    // CHECK: call{{.*}} i8 @llvm.scmp.i8.i64
     a.cmp(&b)
 }
 
 // CHECK-LABEL: @cmp_unsigned
 #[no_mangle]
 pub fn cmp_unsigned(a: u32, b: u32) -> Ordering {
-    // llvm-20: call{{.*}} i8 @llvm.ucmp.i8.i32
-    // llvm-pre-20: icmp ult
-    // llvm-pre-20: icmp ne
-    // llvm-pre-20: zext i1
-    // llvm-pre-20: select i1
+    // CHECK: call{{.*}} i8 @llvm.ucmp.i8.i32
     a.cmp(&b)
 }
 
 // CHECK-LABEL: @cmp_char
 #[no_mangle]
 pub fn cmp_char(a: char, b: char) -> Ordering {
-    // llvm-20: call{{.*}} i8 @llvm.ucmp.i8.i32
-    // llvm-pre-20: icmp ult
-    // llvm-pre-20: icmp ne
-    // llvm-pre-20: zext i1
-    // llvm-pre-20: select i1
+    // CHECK: call{{.*}} i8 @llvm.ucmp.i8.i32
     a.cmp(&b)
 }
 
 // CHECK-LABEL: @cmp_tuple
 #[no_mangle]
 pub fn cmp_tuple(a: (i16, u16), b: (i16, u16)) -> Ordering {
-    // llvm-20-DAG: call{{.*}} i8 @llvm.ucmp.i8.i16
-    // llvm-20-DAG: call{{.*}} i8 @llvm.scmp.i8.i16
-    // llvm-20: ret i8
-    // llvm-pre-20: icmp slt
-    // llvm-pre-20: icmp ne
-    // llvm-pre-20: zext i1
-    // llvm-pre-20: select i1
-    // llvm-pre-20: icmp ult
-    // llvm-pre-20: icmp ne
-    // llvm-pre-20: zext i1
-    // llvm-pre-20: select i1
-    // llvm-pre-20: select i1
+    // CHECK-DAG: call{{.*}} i8 @llvm.ucmp.i8.i16
+    // CHECK-DAG: call{{.*}} i8 @llvm.scmp.i8.i16
+    // CHECK: ret i8
     a.cmp(&b)
 }
diff --git a/tests/codegen-llvm/intrinsics/three_way_compare.rs b/tests/codegen-llvm/intrinsics/three_way_compare.rs
index 95fcb636f7c..89bf69561e9 100644
--- a/tests/codegen-llvm/intrinsics/three_way_compare.rs
+++ b/tests/codegen-llvm/intrinsics/three_way_compare.rs
@@ -2,7 +2,6 @@
 //@ [DEBUG] compile-flags: -C opt-level=0
 //@ [OPTIM] compile-flags: -C opt-level=3
 //@ compile-flags: -C no-prepopulate-passes
-//@ min-llvm-version: 20
 
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
diff --git a/tests/codegen-llvm/issues/and-masked-comparison-131162.rs b/tests/codegen-llvm/issues/and-masked-comparison-131162.rs
index bdf021092fd..fc4b0341a31 100644
--- a/tests/codegen-llvm/issues/and-masked-comparison-131162.rs
+++ b/tests/codegen-llvm/issues/and-masked-comparison-131162.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -Copt-level=3
-//@ min-llvm-version: 20
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen-llvm/issues/issue-101082.rs b/tests/codegen-llvm/issues/issue-101082.rs
index 8d15921ddb4..0c1f90f951a 100644
--- a/tests/codegen-llvm/issues/issue-101082.rs
+++ b/tests/codegen-llvm/issues/issue-101082.rs
@@ -1,6 +1,5 @@
 //@ compile-flags: -Copt-level=3
 //@ revisions: host x86-64 x86-64-v3
-//@ min-llvm-version: 20
 
 //@[host] ignore-x86_64
 
diff --git a/tests/codegen-llvm/issues/issue-129795.rs b/tests/codegen-llvm/issues/issue-129795.rs
index dc64ee35c97..7a928389fab 100644
--- a/tests/codegen-llvm/issues/issue-129795.rs
+++ b/tests/codegen-llvm/issues/issue-129795.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -Copt-level=3
-//@ min-llvm-version: 20
 #![crate_type = "lib"]
 
 // Ensure that a modulo operation with an operand that is known to be
diff --git a/tests/codegen-llvm/issues/iter-max-no-unwrap-failed-129583.rs b/tests/codegen-llvm/issues/iter-max-no-unwrap-failed-129583.rs
index 4d3fa4993ef..4c4eebeabb5 100644
--- a/tests/codegen-llvm/issues/iter-max-no-unwrap-failed-129583.rs
+++ b/tests/codegen-llvm/issues/iter-max-no-unwrap-failed-129583.rs
@@ -3,7 +3,6 @@
 // use a larger value to prevent unrolling.
 
 //@ compile-flags: -Copt-level=3
-//@ min-llvm-version: 20
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen-llvm/issues/looping-over-ne-bytes-133528.rs b/tests/codegen-llvm/issues/looping-over-ne-bytes-133528.rs
index 35acf765d69..b686f8c4b3a 100644
--- a/tests/codegen-llvm/issues/looping-over-ne-bytes-133528.rs
+++ b/tests/codegen-llvm/issues/looping-over-ne-bytes-133528.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -Copt-level=3
-//@ min-llvm-version: 20
 #![crate_type = "lib"]
 
 /// Ensure the function is properly optimized
diff --git a/tests/codegen-llvm/option-niche-eq.rs b/tests/codegen-llvm/option-niche-eq.rs
index 3900cb79aa2..e9c3fa2407e 100644
--- a/tests/codegen-llvm/option-niche-eq.rs
+++ b/tests/codegen-llvm/option-niche-eq.rs
@@ -1,5 +1,4 @@
 //@ revisions: REGULAR LLVM21
-//@ min-llvm-version: 20
 //@ compile-flags: -Copt-level=3 -Zmerge-functions=disabled
 //@ [LLVM21] min-llvm-version: 21
 #![crate_type = "lib"]
diff --git a/tests/codegen-llvm/slice-last-elements-optimization.rs b/tests/codegen-llvm/slice-last-elements-optimization.rs
index d982cda709d..77fc1d21cd9 100644
--- a/tests/codegen-llvm/slice-last-elements-optimization.rs
+++ b/tests/codegen-llvm/slice-last-elements-optimization.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -Copt-level=3
-//@ min-llvm-version: 20
 #![crate_type = "lib"]
 
 // This test verifies that LLVM 20 properly optimizes the bounds check
diff --git a/tests/codegen-llvm/swap-small-types.rs b/tests/codegen-llvm/swap-small-types.rs
index 7aa613ae9c2..0799ff76331 100644
--- a/tests/codegen-llvm/swap-small-types.rs
+++ b/tests/codegen-llvm/swap-small-types.rs
@@ -1,6 +1,5 @@
 //@ compile-flags: -Copt-level=3 -Z merge-functions=disabled
 //@ only-x86_64
-//@ min-llvm-version: 20
 //@ ignore-std-debug-assertions (`ptr::swap_nonoverlapping` has one which blocks some optimizations)
 
 #![crate_type = "lib"]
diff --git a/tests/codegen-llvm/try_question_mark_nop.rs b/tests/codegen-llvm/try_question_mark_nop.rs
index 398c9a580bc..a09fa0a4901 100644
--- a/tests/codegen-llvm/try_question_mark_nop.rs
+++ b/tests/codegen-llvm/try_question_mark_nop.rs
@@ -1,9 +1,6 @@
 //@ compile-flags: -Copt-level=3 -Z merge-functions=disabled
 //@ edition: 2021
 //@ only-x86_64
-//@ revisions: NINETEEN TWENTY
-//@[NINETEEN] exact-llvm-major-version: 19
-//@[TWENTY] min-llvm-version: 20
 
 #![crate_type = "lib"]
 #![feature(try_blocks)]
@@ -17,13 +14,9 @@ pub fn option_nop_match_32(x: Option<u32>) -> Option<u32> {
     // CHECK: start:
     // CHECK-NEXT: [[TRUNC:%.*]] = trunc nuw i32 %0 to i1
 
-    // NINETEEN-NEXT: [[SELECT:%.*]] = select i1 [[TRUNC]], i32 %0, i32 0
-    // NINETEEN-NEXT: [[REG2:%.*]] = insertvalue { i32, i32 } poison, i32 [[SELECT]], 0
-    // NINETEEN-NEXT: [[REG3:%.*]] = insertvalue { i32, i32 } [[REG2]], i32 %1, 1
-
-    // TWENTY-NEXT: [[SELECT:%.*]] = select i1 [[TRUNC]], i32 %1, i32 undef
-    // TWENTY-NEXT: [[REG2:%.*]] = insertvalue { i32, i32 } poison, i32 %0, 0
-    // TWENTY-NEXT: [[REG3:%.*]] = insertvalue { i32, i32 } [[REG2]], i32 [[SELECT]], 1
+    // CHECK-NEXT: [[SELECT:%.*]] = select i1 [[TRUNC]], i32 %1, i32 undef
+    // CHECK-NEXT: [[REG2:%.*]] = insertvalue { i32, i32 } poison, i32 %0, 0
+    // CHECK-NEXT: [[REG3:%.*]] = insertvalue { i32, i32 } [[REG2]], i32 [[SELECT]], 1
 
     // CHECK-NEXT: ret { i32, i32 } [[REG3]]
     match x {
@@ -36,8 +29,8 @@ pub fn option_nop_match_32(x: Option<u32>) -> Option<u32> {
 #[no_mangle]
 pub fn option_nop_traits_32(x: Option<u32>) -> Option<u32> {
     // CHECK: start:
-    // TWENTY-NEXT: %[[IS_SOME:.+]] = trunc nuw i32 %0 to i1
-    // TWENTY-NEXT: select i1 %[[IS_SOME]], i32 %1, i32 undef
+    // CHECK-NEXT: %[[IS_SOME:.+]] = trunc nuw i32 %0 to i1
+    // CHECK-NEXT: select i1 %[[IS_SOME]], i32 %1, i32 undef
     // CHECK-NEXT: insertvalue { i32, i32 }
     // CHECK-NEXT: insertvalue { i32, i32 }
     // CHECK-NEXT: ret { i32, i32 }
@@ -96,13 +89,9 @@ pub fn option_nop_match_64(x: Option<u64>) -> Option<u64> {
     // CHECK: start:
     // CHECK-NEXT: [[TRUNC:%.*]] = trunc nuw i64 %0 to i1
 
-    // NINETEEN-NEXT: [[SELECT:%.*]] = select i1 [[TRUNC]], i64 %0, i64 0
-    // NINETEEN-NEXT: [[REG2:%.*]] = insertvalue { i64, i64 } poison, i64 [[SELECT]], 0
-    // NINETEEN-NEXT: [[REG3:%.*]] = insertvalue { i64, i64 } [[REG2]], i64 %1, 1
-
-    // TWENTY-NEXT: [[SELECT:%.*]] = select i1 [[TRUNC]], i64 %1, i64 undef
-    // TWENTY-NEXT: [[REG2:%.*]] = insertvalue { i64, i64 } poison, i64 %0, 0
-    // TWENTY-NEXT: [[REG3:%.*]] = insertvalue { i64, i64 } [[REG2]], i64 [[SELECT]], 1
+    // CHECK-NEXT: [[SELECT:%.*]] = select i1 [[TRUNC]], i64 %1, i64 undef
+    // CHECK-NEXT: [[REG2:%.*]] = insertvalue { i64, i64 } poison, i64 %0, 0
+    // CHECK-NEXT: [[REG3:%.*]] = insertvalue { i64, i64 } [[REG2]], i64 [[SELECT]], 1
 
     // CHECK-NEXT: ret { i64, i64 } [[REG3]]
     match x {
@@ -115,8 +104,8 @@ pub fn option_nop_match_64(x: Option<u64>) -> Option<u64> {
 #[no_mangle]
 pub fn option_nop_traits_64(x: Option<u64>) -> Option<u64> {
     // CHECK: start:
-    // TWENTY-NEXT: %[[TRUNC:[0-9]+]] = trunc nuw i64 %0 to i1
-    // TWENTY-NEXT: %[[SEL:\.[0-9]+]] = select i1 %[[TRUNC]], i64 %1, i64 undef
+    // CHECK-NEXT: %[[TRUNC:[0-9]+]] = trunc nuw i64 %0 to i1
+    // CHECK-NEXT: %[[SEL:\.[0-9]+]] = select i1 %[[TRUNC]], i64 %1, i64 undef
     // CHECK-NEXT: insertvalue { i64, i64 }
     // CHECK-NEXT: insertvalue { i64, i64 }
     // CHECK-NEXT: ret { i64, i64 }
diff --git a/tests/codegen-llvm/union-aggregate.rs b/tests/codegen-llvm/union-aggregate.rs
index aac66c5dcdd..7faa66804fe 100644
--- a/tests/codegen-llvm/union-aggregate.rs
+++ b/tests/codegen-llvm/union-aggregate.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -Copt-level=0 -Cno-prepopulate-passes
-//@ min-llvm-version: 19
 //@ only-64bit
 
 #![crate_type = "lib"]