x86_64-legalize-inttoptr.mir
866 Bytes
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=x86_64-linux-gnu -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s
--- |
define i64* @inttoptr_p0_s64(i64 %val) {
entry:
%0 = inttoptr i64 %val to i64*
ret i64* %0
}
...
---
name: inttoptr_p0_s64
alignment: 16
tracksRegLiveness: true
registers:
- { id: 0, class: _ }
- { id: 1, class: _ }
body: |
bb.1.entry:
liveins: $rdi
; CHECK-LABEL: name: inttoptr_p0_s64
; CHECK: liveins: $rdi
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $rdi
; CHECK: [[INTTOPTR:%[0-9]+]]:_(p0) = G_INTTOPTR [[COPY]](s64)
; CHECK: $rax = COPY [[INTTOPTR]](p0)
; CHECK: RET 0, implicit $rax
%0:_(s64) = COPY $rdi
%1:_(p0) = G_INTTOPTR %0(s64)
$rax = COPY %1(p0)
RET 0, implicit $rax
...