llvm/llvm/test/CodeGen/AArch64/sme-read-write-tpidr2.ll

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=aarch64 -mattr=+sme < %s | FileCheck %s

define i64 @get_tpidr2_el0() {
; CHECK-LABEL: get_tpidr2_el0:
; CHECK:       // %bb.0:
; CHECK-NEXT:    mrs x0, TPIDR2_EL0
; CHECK-NEXT:    ret
  %res = call i64 @llvm.aarch64.sme.get.tpidr2()
  ret i64 %res
}

define void @set_tpidr2_el0(i64 %v) {
; CHECK-LABEL: set_tpidr2_el0:
; CHECK:       // %bb.0:
; CHECK-NEXT:    msr TPIDR2_EL0, x0
; CHECK-NEXT:    ret
  call void @llvm.aarch64.sme.set.tpidr2(i64 %v)
  ret void
}

declare i64 @llvm.aarch64.sme.get.tpidr2()
declare void @llvm.aarch64.sme.set.tpidr2(i64 %v)