Skip to content

Commit 3d8f454

Browse files
committed
Update bool-cmp.rs codegen
1 parent 31aeccc commit 3d8f454

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/codegen/bool-cmp.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ use std::cmp::Ordering;
1010
// CHECK-LABEL: @cmp_bool
1111
#[no_mangle]
1212
pub fn cmp_bool(a: bool, b: bool) -> Ordering {
13+
// LLVM 10 produces (zext a) + (sext b), but the final lowering is (zext a) - (zext b).
1314
// CHECK: zext i1
14-
// CHECK: zext i1
15-
// CHECK: sub nsw
15+
// CHECK: {{z|s}}ext i1
16+
// CHECK: {{sub|add}} nsw
1617
a.cmp(&b)
1718
}

0 commit comments

Comments
 (0)