Skip to content

Commit 1c248ea

Browse files
authored
Rollup merge of #98920 - krasimirgg:llvm-15-issue-37945, r=nikic
adapt issue-37945 codegen test to accept any order of ops Adapt this test to accept `icmp` operands in any order as a follow-up to cbbf06b#commitcomment-77670922.
2 parents a82f4a5 + 9eec334 commit 1c248ea

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: src/test/codegen/issue-37945.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ pub fn is_empty_1(xs: Iter<f32>) -> bool {
1717
// CHECK-NEXT: start:
1818
// CHECK-NEXT: [[A:%.*]] = icmp ne {{i32\*|ptr}} %xs.1, null
1919
// CHECK-NEXT: tail call void @llvm.assume(i1 [[A]])
20-
// CHECK-NEXT: [[B:%.*]] = icmp eq {{i32\*|ptr}} %xs.1, %xs.0
20+
// The order between %xs.0 and %xs.1 on the next line doesn't matter
21+
// and different LLVM versions produce different order.
22+
// CHECK-NEXT: [[B:%.*]] = icmp eq {{i32\*|ptr}} {{%xs.0, %xs.1|%xs.1, %xs.0}}
2123
// CHECK-NEXT: ret i1 [[B:%.*]]
2224
{xs}.next().is_none()
2325
}
@@ -28,7 +30,9 @@ pub fn is_empty_2(xs: Iter<f32>) -> bool {
2830
// CHECK-NEXT: start:
2931
// CHECK-NEXT: [[C:%.*]] = icmp ne {{i32\*|ptr}} %xs.1, null
3032
// CHECK-NEXT: tail call void @llvm.assume(i1 [[C]])
31-
// CHECK-NEXT: [[D:%.*]] = icmp eq {{i32\*|ptr}} %xs.1, %xs.0
33+
// The order between %xs.0 and %xs.1 on the next line doesn't matter
34+
// and different LLVM versions produce different order.
35+
// CHECK-NEXT: [[D:%.*]] = icmp eq {{i32\*|ptr}} {{%xs.0, %xs.1|%xs.1, %xs.0}}
3236
// CHECK-NEXT: ret i1 [[D:%.*]]
3337
xs.map(|&x| x).next().is_none()
3438
}

0 commit comments

Comments
 (0)