1; RUN: llc -verify-machineinstrs -aarch64-atomic-cfg-tidy=0 < %s -mtriple=aarch64-none-eabihf -fast-isel=false | FileCheck %s
2
3
4define i32 @ule_64_max(i64 %p) {
5entry:
6; CHECK-LABEL: ule_64_max:
7; CHECK: cmn x0, #1
8; CHECK: b.hi [[RET_ZERO:.LBB[0-9]+_[0-9]+]]
9  %cmp = icmp ule i64 %p, 18446744073709551615 ; 0xffffffffffffffff
10  br i1 %cmp, label %ret_one, label %ret_zero
11
12ret_one:
13  ret i32 1
14
15ret_zero:
16; CHECK: [[RET_ZERO]]:
17; CHECK-NEXT: mov w0, wzr
18  ret i32 0
19}
20
21define i32 @ugt_64_max(i64 %p) {
22entry:
23; CHECK-LABEL: ugt_64_max:
24; CHECK: cmn x0, #1
25; CHECK: b.ls [[RET_ZERO:.LBB[0-9]+_[0-9]+]]
26  %cmp = icmp ugt i64 %p, 18446744073709551615 ; 0xffffffffffffffff
27  br i1 %cmp, label %ret_one, label %ret_zero
28
29ret_one:
30  ret i32 1
31
32ret_zero:
33; CHECK: [[RET_ZERO]]:
34; CHECK-NEXT: mov w0, wzr
35  ret i32 0
36}
37