Skip to content

Commit 496dec1

Browse files
authored
Unrolled build for #153305
Rollup merge of #153305 - TimNN:bundle-assert, r=Mark-Simulacrum Adapt codegen test to accept operand bundles The updated test current fails when rustc is built with HEAD LLVM: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/44013/steps/canvas?sid=019cafec-3cca-44b2-aa9f-b41c0a940e8b Likely as a result of llvm/llvm-project#169923 Since the new codegen merges two lines into one, I couldn't figure out a way to make the test work on both LLVM versions without introducing revisions. (Though I could instead make the test run on only LLVM 23+). @rustbot label llvm-main
2 parents 655a7d2 + 13ddff5 commit 496dec1

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

tests/codegen-llvm/issues/issue-37945.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
//@ compile-flags: -Copt-level=3 -Zmerge-functions=disabled
22
//@ ignore-32bit LLVM has a bug with them
3+
//@ revisions: new old
4+
//@ [old] max-llvm-major-version: 22
5+
//@ [new] min-llvm-version: 23
36

47
// Check that LLVM understands that `Iter` pointer is not null. Issue #37945.
58

@@ -11,8 +14,9 @@ use std::slice::Iter;
1114
pub fn is_empty_1(xs: Iter<f32>) -> bool {
1215
// CHECK-LABEL: @is_empty_1(
1316
// CHECK-NEXT: start:
14-
// CHECK-NEXT: [[A:%.*]] = icmp ne ptr {{%xs.0|%xs.1}}, null
15-
// CHECK-NEXT: tail call void @llvm.assume(i1 [[A]])
17+
// old-NEXT: [[A:%.*]] = icmp ne ptr {{%xs.0|%xs.1}}, null
18+
// old-NEXT: tail call void @llvm.assume(i1 [[A]])
19+
// new-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(ptr {{%xs.0|%xs.1}}) ]
1620
// The order between %xs.0 and %xs.1 on the next line doesn't matter
1721
// and different LLVM versions produce different order.
1822
// CHECK-NEXT: [[B:%.*]] = icmp eq ptr {{%xs.0, %xs.1|%xs.1, %xs.0}}
@@ -24,8 +28,9 @@ pub fn is_empty_1(xs: Iter<f32>) -> bool {
2428
pub fn is_empty_2(xs: Iter<f32>) -> bool {
2529
// CHECK-LABEL: @is_empty_2
2630
// CHECK-NEXT: start:
27-
// CHECK-NEXT: [[C:%.*]] = icmp ne ptr {{%xs.0|%xs.1}}, null
28-
// CHECK-NEXT: tail call void @llvm.assume(i1 [[C]])
31+
// old-NEXT: [[C:%.*]] = icmp ne ptr {{%xs.0|%xs.1}}, null
32+
// old-NEXT: tail call void @llvm.assume(i1 [[C]])
33+
// new-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(ptr {{%xs.0|%xs.1}}) ]
2934
// The order between %xs.0 and %xs.1 on the next line doesn't matter
3035
// and different LLVM versions produce different order.
3136
// CHECK-NEXT: [[D:%.*]] = icmp eq ptr {{%xs.0, %xs.1|%xs.1, %xs.0}}

0 commit comments

Comments
 (0)