forked from OSchip/llvm-project
[AArch64][GlobalISel] Add a test case for G_PHI of p0 instruction selection.
llvm-svn: 315179
This commit is contained in:
parent
e205cab66f
commit
1f83777bd3
|
@ -23,6 +23,11 @@
|
|||
ret i32 %res
|
||||
}
|
||||
|
||||
define i64* @test_phi_ptr(i64* %a, i64* %b, i1 %cond) {
|
||||
entry:
|
||||
ret i64* null
|
||||
}
|
||||
|
||||
...
|
||||
---
|
||||
name: test_phi
|
||||
|
@ -76,3 +81,43 @@ body: |
|
|||
RET_ReallyLR implicit %w0
|
||||
|
||||
...
|
||||
|
||||
---
|
||||
name: test_phi_ptr
|
||||
alignment: 2
|
||||
exposesReturnsTwice: false
|
||||
legalized: true
|
||||
regBankSelected: true
|
||||
selected: false
|
||||
tracksRegLiveness: true
|
||||
registers:
|
||||
- { id: 0, class: gpr, preferred-register: '' }
|
||||
- { id: 1, class: gpr, preferred-register: '' }
|
||||
- { id: 2, class: gpr, preferred-register: '' }
|
||||
- { id: 3, class: gpr, preferred-register: '' }
|
||||
- { id: 4, class: _, preferred-register: '' }
|
||||
- { id: 5, class: _, preferred-register: '' }
|
||||
liveins:
|
||||
body: |
|
||||
bb.0:
|
||||
successors: %bb.1, %bb.2
|
||||
liveins: %w2, %x0, %x1
|
||||
; CHECK-LABEL: name: test_phi_ptr
|
||||
|
||||
%0(p0) = COPY %x0
|
||||
%1(p0) = COPY %x1
|
||||
%2(s1) = COPY %w2
|
||||
G_BRCOND %2(s1), %bb.1
|
||||
G_BR %bb.2
|
||||
|
||||
bb.1:
|
||||
successors: %bb.2
|
||||
|
||||
|
||||
bb.2:
|
||||
; CHECK: %{{[0-9]+}} = PHI %{{[0-9]+}}, %bb.0, %{{[0-9]+}}, %bb.1
|
||||
%3(p0) = G_PHI %0(p0), %bb.0, %1(p0), %bb.1
|
||||
%x0 = COPY %3(p0)
|
||||
RET_ReallyLR implicit %x0
|
||||
|
||||
...
|
||||
|
|
Loading…
Reference in New Issue