mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 23:18:51 +00:00
GlobalISel: mark pointer casts legal on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279553 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c016311937
commit
3891c455e2
@ -72,5 +72,8 @@ AArch64MachineLegalizer::AArch64MachineLegalizer() {
|
||||
|
||||
setAction(G_FRAME_INDEX, LLT::pointer(0), Legal);
|
||||
|
||||
setAction(G_PTRTOINT, s64, Legal);
|
||||
setAction(G_INTTOPTR, LLT::pointer(0), Legal);
|
||||
|
||||
computeTables();
|
||||
}
|
||||
|
29
test/CodeGen/AArch64/GlobalISel/legalize-simple.mir
Normal file
29
test/CodeGen/AArch64/GlobalISel/legalize-simple.mir
Normal file
@ -0,0 +1,29 @@
|
||||
# RUN: llc -O0 -run-pass=legalize-mir -global-isel %s -o - 2>&1 | FileCheck %s
|
||||
|
||||
--- |
|
||||
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
|
||||
target triple = "aarch64-apple-ios"
|
||||
define void @test_simple() {
|
||||
entry:
|
||||
ret void
|
||||
}
|
||||
...
|
||||
|
||||
---
|
||||
name: test_simple
|
||||
isSSA: true
|
||||
registers:
|
||||
- { id: 0, class: _ }
|
||||
- { id: 1, class: _ }
|
||||
- { id: 2, class: _ }
|
||||
body: |
|
||||
bb.0.entry:
|
||||
liveins: %x0, %x1, %x2, %x3
|
||||
%0(64) = COPY %x0
|
||||
|
||||
; CHECK-LABEL: name: test_simple
|
||||
; CHECK: %1(64) = G_PTRTOINT { s64, p0 } %0
|
||||
; CHECK: %2(64) = G_INTTOPTR { p0, s64 } %1
|
||||
%1(64) = G_PTRTOINT { s64, p0 } %0
|
||||
%2(64) = G_INTTOPTR { p0, s64 } %1
|
||||
...
|
Loading…
Reference in New Issue
Block a user