1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-apple-ios -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s
4 # Check that we can legalize G_BZERO on Darwin.
9 tracksRegLiveness: true
13 ; CHECK-LABEL: name: bzero
14 ; CHECK: liveins: $x0, $x1
15 ; CHECK: %ptr:_(p0) = COPY $x0
16 ; CHECK: %width:_(s64) = COPY $x1
17 ; CHECK: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp
18 ; CHECK: $x0 = COPY %ptr(p0)
19 ; CHECK: $x1 = COPY %width(s64)
20 ; CHECK: BL &bzero, csr_darwin_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit $x0, implicit $x1
21 ; CHECK: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp
24 %width:_(s64) = COPY $x1
25 G_BZERO %ptr(p0), %width(s64), 0 :: (store (s32))
31 tracksRegLiveness: true
35 ; CHECK-LABEL: name: bzero_tail_call
36 ; CHECK: liveins: $x0, $x1
37 ; CHECK: %ptr:_(p0) = COPY $x0
38 ; CHECK: %width:_(s64) = COPY $x1
39 ; CHECK: $x0 = COPY %ptr(p0)
40 ; CHECK: $x1 = COPY %width(s64)
41 ; CHECK: TCRETURNdi &bzero, 0, csr_darwin_aarch64_aapcs, implicit $sp, implicit $x0, implicit $x1
43 %width:_(s64) = COPY $x1
44 G_BZERO %ptr(p0), %width(s64), 1 :: (store (s32))