1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64-- | FileCheck %s
6 ; The overflow check may be against the input rather than the sum.
8 define i1 @uaddo_i64_increment_alt(i64 %x, i64* %p) {
9 ; CHECK-LABEL: uaddo_i64_increment_alt:
11 ; CHECK-NEXT: adds x8, x0, #1 // =1
12 ; CHECK-NEXT: cset w0, hs
13 ; CHECK-NEXT: str x8, [x1]
17 %ov = icmp eq i64 %x, -1
21 ; Make sure insertion is done correctly based on dominance.
23 define i1 @uaddo_i64_increment_alt_dom(i64 %x, i64* %p) {
24 ; CHECK-LABEL: uaddo_i64_increment_alt_dom:
26 ; CHECK-NEXT: adds x8, x0, #1 // =1
27 ; CHECK-NEXT: cset w0, hs
28 ; CHECK-NEXT: str x8, [x1]
30 %ov = icmp eq i64 %x, -1
36 ; The overflow check may be against the input rather than the sum.
38 define i1 @uaddo_i64_decrement_alt(i64 %x, i64* %p) {
39 ; CHECK-LABEL: uaddo_i64_decrement_alt:
41 ; CHECK-NEXT: subs x8, x0, #1 // =1
42 ; CHECK-NEXT: cset w0, hs
43 ; CHECK-NEXT: str x8, [x1]
47 %ov = icmp ne i64 %x, 0
51 ; Make sure insertion is done correctly based on dominance.
53 define i1 @uaddo_i64_decrement_alt_dom(i64 %x, i64* %p) {
54 ; CHECK-LABEL: uaddo_i64_decrement_alt_dom:
56 ; CHECK-NEXT: subs x8, x0, #1 // =1
57 ; CHECK-NEXT: cset w0, hs
58 ; CHECK-NEXT: str x8, [x1]
60 %ov = icmp ne i64 %x, 0