1 ; RUN: llc -mtriple=arm64-apple-iphoneos -stop-after=finalize-isel %s -o - | FileCheck %s
3 declare ptr @llvm.ptrmask.p0.i64(ptr , i64)
5 ; CHECK-LABEL: name: test1
6 ; CHECK: %0:gpr64 = COPY $x0
7 ; CHECK-NEXT: %1:gpr64sp = ANDXri %0, 8052
8 ; CHECK-NEXT: $x0 = COPY %1
9 ; CHECK-NEXT: RET_ReallyLR implicit $x0
11 define ptr @test1(ptr %src) {
12 %ptr = call ptr @llvm.ptrmask.p0.i64(ptr %src, i64 72057594037927928)
16 declare ptr @llvm.ptrmask.p0.i32(ptr, i32)
18 ; CHECK-LABEL: name: test2
19 ; CHECK: %0:gpr64 = COPY $x0
20 ; CHECK-NEXT: %1:gpr32 = MOVi32imm 10000
21 ; CHECK-NEXT: %2:gpr64 = SUBREG_TO_REG 0, killed %1, %subreg.sub_32
22 ; CHECK-NEXT: %3:gpr64 = ANDXrr %0, killed %2
23 ; CHECK-NEXT: $x0 = COPY %3
24 ; CHECK-NEXT: RET_ReallyLR implicit $x0
26 define ptr @test2(ptr %src) {
27 %ptr = call ptr @llvm.ptrmask.p0.i32(ptr %src, i32 10000)