xref: /llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-ptrtoint.mir (revision 9e9907f1cfa424366fba58d9520f9305b537cec9)
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -mtriple=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
3---
4
5name: ptrtoint_s_p3_to_s_s32
6legalized:       true
7regBankSelected: true
8tracksRegLiveness: true
9
10body: |
11  bb.0:
12    liveins: $sgpr0
13
14    ; CHECK-LABEL: name: ptrtoint_s_p3_to_s_s32
15    ; CHECK: liveins: $sgpr0
16    ; CHECK-NEXT: {{  $}}
17    ; CHECK-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
18    ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY]]
19    %0:sgpr(p3) = COPY $sgpr0
20    %1:sgpr(s32) = G_PTRTOINT %0
21    S_ENDPGM 0, implicit %1
22...
23
24---
25
26name: ptrtoint_s_p5_to_s_s32
27legalized:       true
28regBankSelected: true
29tracksRegLiveness: true
30
31body: |
32  bb.0:
33    liveins: $sgpr0
34
35    ; CHECK-LABEL: name: ptrtoint_s_p5_to_s_s32
36    ; CHECK: liveins: $sgpr0
37    ; CHECK-NEXT: {{  $}}
38    ; CHECK-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
39    ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY]]
40    %0:sgpr(p5) = COPY $sgpr0
41    %1:sgpr(s32) = G_PTRTOINT %0
42    S_ENDPGM 0, implicit %1
43...
44
45---
46
47name: ptrtoint_s_p0_to_s_s64
48legalized:       true
49regBankSelected: true
50tracksRegLiveness: true
51
52body: |
53  bb.0:
54    liveins: $sgpr0_sgpr1
55
56    ; CHECK-LABEL: name: ptrtoint_s_p0_to_s_s64
57    ; CHECK: liveins: $sgpr0_sgpr1
58    ; CHECK-NEXT: {{  $}}
59    ; CHECK-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
60    ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY]]
61    %0:sgpr(p0) = COPY $sgpr0_sgpr1
62    %1:sgpr(s64) = G_PTRTOINT %0
63    S_ENDPGM 0, implicit %1
64...
65
66---
67
68name: ptrtoint_s_p1_to_s_s64
69legalized:       true
70regBankSelected: true
71tracksRegLiveness: true
72
73body: |
74  bb.0:
75    liveins: $sgpr0_sgpr1
76
77    ; CHECK-LABEL: name: ptrtoint_s_p1_to_s_s64
78    ; CHECK: liveins: $sgpr0_sgpr1
79    ; CHECK-NEXT: {{  $}}
80    ; CHECK-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
81    ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY]]
82    %0:sgpr(p1) = COPY $sgpr0_sgpr1
83    %1:sgpr(s64) = G_PTRTOINT %0
84    S_ENDPGM 0, implicit %1
85...
86
87---
88
89name: ptrtoint_s_p999_to_s_s64
90legalized:       true
91regBankSelected: true
92tracksRegLiveness: true
93
94body: |
95  bb.0:
96    liveins: $sgpr0_sgpr1
97
98    ; CHECK-LABEL: name: ptrtoint_s_p999_to_s_s64
99    ; CHECK: liveins: $sgpr0_sgpr1
100    ; CHECK-NEXT: {{  $}}
101    ; CHECK-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
102    ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY]]
103    %0:sgpr(p999) = COPY $sgpr0_sgpr1
104    %1:sgpr(s64) = G_PTRTOINT %0
105    S_ENDPGM 0, implicit %1
106...
107