1 ; RUN: llc -mtriple=x86_64-apple-macosx -stop-after=finalize-isel %s -o - | FileCheck %s
3 declare i8* @llvm.ptrmask.p0i8.i64(i8* , i64)
5 ; CHECK-LABEL: name: test1
6 ; CHECK: %0:gr64 = COPY $rdi
7 ; CHECK-NEXT: %1:gr64 = MOV64ri 72057594037927928
8 ; CHECK-NEXT: %2:gr64 = AND64rr %0, killed %1, implicit-def dead $eflags
9 ; CHECK-NEXT: $rax = COPY %2
10 ; CHECK-NEXT: RET 0, $rax
12 define i8* @test1(i8* %src) {
13 %ptr = call i8* @llvm.ptrmask.p0i8.i64(i8* %src, i64 72057594037927928)
17 declare i8* @llvm.ptrmask.p0i8.i32(i8*, i32)
19 ; CHECK-LABEL: name: test2
20 ; CHECK: %0:gr64 = COPY $rdi
21 ; CHECK-NEXT: %1:gr32 = COPY %0.sub_32bit
22 ; CHECK-NEXT: %2:gr32 = AND32ri %1, 10000, implicit-def dead $eflags
23 ; CHECK-NEXT: %3:gr64 = SUBREG_TO_REG 0, killed %2, %subreg.sub_32bit
24 ; CHECK-NEXT: $rax = COPY %3
25 ; CHECK-NEXT: RET 0, $rax
28 define i8* @test2(i8* %src) {
29 %ptr = call i8* @llvm.ptrmask.p0i8.i32(i8* %src, i32 10000)