; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple arm64e-apple-darwin             -verify-machineinstrs -global-isel=0 | FileCheck %s
; RUN: llc < %s -mtriple arm64e-apple-darwin             -verify-machineinstrs -global-isel=1 -global-isel-abort=1 | FileCheck %s
; RUN: llc < %s -mtriple aarch64-linux-gnu -mattr=+pauth -verify-machineinstrs -global-isel=0 | FileCheck %s
; RUN: llc < %s -mtriple aarch64-linux-gnu -mattr=+pauth -verify-machineinstrs -global-isel=1 -global-isel-abort=1 | FileCheck %s

define i64 @test_sign_generic(i64 %arg, i64 %arg1) {
; CHECK-LABEL: test_sign_generic:
; CHECK:       %bb.0:
; CHECK-NEXT:    pacga x0, x0, x1
; CHECK-NEXT:    ret
  %tmp = call i64 @llvm.ptrauth.sign.generic(i64 %arg, i64 %arg1)
  ret i64 %tmp
}

declare i64 @llvm.ptrauth.sign.generic(i64, i64)
