2018-02-28 20:11:53 +08:00
|
|
|
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
2018-05-06 05:19:59 +08:00
|
|
|
# RUN: llc -mtriple=x86_64-linux-gnu -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s
|
2018-02-28 20:11:53 +08:00
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
|
define i64* @inttoptr_p0_s64(i64 %val) {
|
|
|
|
entry:
|
|
|
|
%0 = inttoptr i64 %val to i64*
|
|
|
|
ret i64* %0
|
|
|
|
}
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: inttoptr_p0_s64
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 16
|
2018-02-28 20:11:53 +08:00
|
|
|
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
|
|
|
|
|
|
|
|
...
|