1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64-linux-gnu -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=CHECK
4 define i1 @ptrtoint_s1_p0(i64* %p) {
5 ; CHECK-LABEL: ptrtoint_s1_p0:
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: movq %rdi, %rax
8 ; CHECK-NEXT: # kill: def $al killed $al killed $rax
11 %0 = ptrtoint i64* %p to i1
15 define i8 @ptrtoint_s8_p0(i64* %p) {
16 ; CHECK-LABEL: ptrtoint_s8_p0:
17 ; CHECK: # %bb.0: # %entry
18 ; CHECK-NEXT: movq %rdi, %rax
19 ; CHECK-NEXT: # kill: def $al killed $al killed $rax
22 %0 = ptrtoint i64* %p to i8
26 define i16 @ptrtoint_s16_p0(i64* %p) {
27 ; CHECK-LABEL: ptrtoint_s16_p0:
28 ; CHECK: # %bb.0: # %entry
29 ; CHECK-NEXT: movq %rdi, %rax
30 ; CHECK-NEXT: # kill: def $ax killed $ax killed $rax
33 %0 = ptrtoint i64* %p to i16
37 define i32 @ptrtoint_s32_p0(i64* %p) {
38 ; CHECK-LABEL: ptrtoint_s32_p0:
39 ; CHECK: # %bb.0: # %entry
40 ; CHECK-NEXT: movq %rdi, %rax
41 ; CHECK-NEXT: # kill: def $eax killed $eax killed $rax
44 %0 = ptrtoint i64* %p to i32
48 define i64 @ptrtoint_s64_p0(i64* %p) {
49 ; CHECK-LABEL: ptrtoint_s64_p0:
50 ; CHECK: # %bb.0: # %entry
51 ; CHECK-NEXT: movq %rdi, %rax
54 %0 = ptrtoint i64* %p to i64