llvm/llvm/test/CodeGen/AArch64/sme-toggle-pstateza.ll

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=aarch64 -mattr=+sme -enable-aarch64-sme-peephole-opt=true -verify-machineinstrs < %s | FileCheck %s --check-prefix=CHECK-OPT
; RUN: llc -mtriple=aarch64 -mattr=+sme -enable-aarch64-sme-peephole-opt=false -verify-machineinstrs < %s | FileCheck %s --check-prefix=CHECK

define void @toggle_pstate_za() {
; CHECK-OPT-LABEL: toggle_pstate_za:
; CHECK-OPT:       // %bb.0:
; CHECK-OPT-NEXT:    ret
;
; CHECK-LABEL: toggle_pstate_za:
; CHECK:       // %bb.0:
; CHECK-NEXT:    smstart za
; CHECK-NEXT:    smstop za
; CHECK-NEXT:    ret
  call void @llvm.aarch64.sme.za.enable()
  call void @llvm.aarch64.sme.za.disable()
  ret void
}

declare void @llvm.aarch64.sme.za.enable()
declare void @llvm.aarch64.sme.za.disable()