; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc < %s | FileCheck %s --check-prefixes=CHECK,CHECK-SD ; RUN: llc < %s -global-isel | FileCheck %s --check-prefixes=CHECK,CHECK-GI target triple = "arm64-apple-ios7.0" define i64 @foo(ptr nocapture readonly %ptr, i64 %a, i64 %b, i64 %c) local_unnamed_addr #0 { ; CHECK-SD-LABEL: foo: ; CHECK-SD: ; %bb.0: ; %entry ; CHECK-SD-NEXT: lsr x8, x1, #32 ; CHECK-SD-NEXT: ldr w9, [x0, #4] ; CHECK-SD-NEXT: cmn x3, x2 ; CHECK-SD-NEXT: umull x8, w9, w8 ; CHECK-SD-NEXT: cinc x0, x8, hs ; CHECK-SD-NEXT: ret ; ; CHECK-GI-LABEL: foo: ; CHECK-GI: ; %bb.0: ; %entry ; CHECK-GI-NEXT: ldr x8, [x0] ; CHECK-GI-NEXT: lsr x9, x1, #32 ; CHECK-GI-NEXT: cmn x3, x2 ; CHECK-GI-NEXT: cset w10, hs ; CHECK-GI-NEXT: lsr x8, x8, #32 ; CHECK-GI-NEXT: and x10, x10, #0x1 ; CHECK-GI-NEXT: umaddl x0, w8, w9, x10 ; CHECK-GI-NEXT: ret entry: %0 = lshr i64 %a, 32 %1 = load i64, ptr %ptr, align 8 %2 = lshr i64 %1, 32 %3 = mul nuw i64 %2, %0 %4 = add i64 %c, %b %5 = icmp ult i64 %4, %c %6 = zext i1 %5 to i64 %7 = add i64 %3, %6 ret i64 %7 } attributes #0 = { norecurse nounwind readonly } ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: ; CHECK: {{.*}}