; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 ; RUN: llc -O3 < %s | FileCheck %s target triple = "aarch64" ; Test that the compiler falls back to SelectionDAG ISel for an optnone function, ; so that the lazy-save is generated (currently not yet supported by GlobalISel). define void @foo() noinline optnone "aarch64_new_za" "target-features"="+sme" { ; CHECK-LABEL: foo: ; CHECK: // %bb.0: ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill ; CHECK-NEXT: .cfi_def_cfa_offset 16 ; CHECK-NEXT: .cfi_offset w30, -16 ; CHECK-NEXT: mrs x8, TPIDR2_EL0 ; CHECK-NEXT: cbnz x8, .LBB0_1 ; CHECK-NEXT: b .LBB0_2 ; CHECK-NEXT: .LBB0_1: ; CHECK-NEXT: bl __arm_tpidr2_save ; CHECK-NEXT: msr TPIDR2_EL0, xzr ; CHECK-NEXT: zero {za} ; CHECK-NEXT: b .LBB0_2 ; CHECK-NEXT: .LBB0_2: ; CHECK-NEXT: smstart za ; CHECK-NEXT: bl bar ; CHECK-NEXT: smstop za ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload ; CHECK-NEXT: ret call void @bar() ret void } declare void @bar() "aarch64_inout_za"