Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 135 additions & 0 deletions llvm/test/CodeGen/AMDGPU/fold-imm-copy-agpr.mir
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
# RUN: llc -mtriple=amdgcn -mcpu=gfx90a -run-pass=si-fold-operands %s -o - | FileCheck -check-prefix=GCN %s

---
name: v_mov_b64_pseudo_imm_0_copy_to_areg_64
tracksRegLiveness: true
body: |
bb.0:
; GCN-LABEL: name: v_mov_b64_pseudo_imm_0_copy_to_areg_64
; GCN: [[V_MOV_B:%[0-9]+]]:vreg_64_align2 = V_MOV_B64_PSEUDO 0, implicit $exec
; GCN-NEXT: [[COPY:%[0-9]+]]:areg_64_align2 = COPY [[V_MOV_B]]
; GCN-NEXT: $agpr0_agpr1 = COPY [[COPY]]
; GCN-NEXT: S_ENDPGM 0
%0:vreg_64_align2 = V_MOV_B64_PSEUDO 0, implicit $exec
%1:areg_64_align2 = COPY %0
$agpr0_agpr1 = COPY %1
S_ENDPGM 0

...

---
name: v_mov_b64_pseudo_imm_neg1_copy_to_areg_64
tracksRegLiveness: true
body: |
bb.0:
; GCN-LABEL: name: v_mov_b64_pseudo_imm_neg1_copy_to_areg_64
; GCN: [[V_MOV_B:%[0-9]+]]:vreg_64_align2 = V_MOV_B64_PSEUDO -1, implicit $exec
; GCN-NEXT: [[COPY:%[0-9]+]]:areg_64_align2 = COPY [[V_MOV_B]]
; GCN-NEXT: $agpr0_agpr1 = COPY [[COPY]]
; GCN-NEXT: S_ENDPGM 0
%0:vreg_64_align2 = V_MOV_B64_PSEUDO -1, implicit $exec
%1:areg_64_align2 = COPY %0
$agpr0_agpr1 = COPY %1
S_ENDPGM 0

...

---
name: v_mov_b64_pseudo_literal_copy_to_areg_64
tracksRegLiveness: true
body: |
bb.0:
; GCN-LABEL: name: v_mov_b64_pseudo_literal_copy_to_areg_64
; GCN: [[V_MOV_B:%[0-9]+]]:vreg_64_align2 = V_MOV_B64_PSEUDO 999, implicit $exec
; GCN-NEXT: [[COPY:%[0-9]+]]:areg_64_align2 = COPY [[V_MOV_B]]
; GCN-NEXT: $agpr0_agpr1 = COPY [[COPY]]
; GCN-NEXT: S_ENDPGM 0
%0:vreg_64_align2 = V_MOV_B64_PSEUDO 999, implicit $exec
%1:areg_64_align2 = COPY %0
$agpr0_agpr1 = COPY %1
S_ENDPGM 0

...

---
name: v_mov_b64_pseudo_imm_0_copy_sub0_to_agpr_32
tracksRegLiveness: true
body: |
bb.0:
; GCN-LABEL: name: v_mov_b64_pseudo_imm_0_copy_sub0_to_agpr_32
; GCN: [[V_ACCVGPR_WRITE_B32_e64_:%[0-9]+]]:agpr_32 = V_ACCVGPR_WRITE_B32_e64 0, implicit $exec
; GCN-NEXT: $agpr0 = COPY [[V_ACCVGPR_WRITE_B32_e64_]]
; GCN-NEXT: S_ENDPGM 0
%0:vreg_64_align2 = V_MOV_B64_PSEUDO 0, implicit $exec
%1:agpr_32 = COPY %0.sub0
$agpr0 = COPY %1
S_ENDPGM 0

...

---
name: v_mov_b64_pseudo_imm_0_copy_sub1_to_agpr_32
tracksRegLiveness: true
body: |
bb.0:
; GCN-LABEL: name: v_mov_b64_pseudo_imm_0_copy_sub1_to_agpr_32
; GCN: [[V_ACCVGPR_WRITE_B32_e64_:%[0-9]+]]:agpr_32 = V_ACCVGPR_WRITE_B32_e64 0, implicit $exec
; GCN-NEXT: $agpr0 = COPY [[V_ACCVGPR_WRITE_B32_e64_]]
; GCN-NEXT: S_ENDPGM 0
%0:vreg_64_align2 = V_MOV_B64_PSEUDO 0, implicit $exec
%1:agpr_32 = COPY %0.sub1
$agpr0 = COPY %1
S_ENDPGM 0

...

---
name: v_mov_b64_pseudo_lit_copy_sub0_to_agpr_32
tracksRegLiveness: true
body: |
bb.0:
; GCN-LABEL: name: v_mov_b64_pseudo_lit_copy_sub0_to_agpr_32
; GCN: [[V_MOV_B:%[0-9]+]]:vreg_64_align2 = V_MOV_B64_PSEUDO 4290672329592, implicit $exec
; GCN-NEXT: [[COPY:%[0-9]+]]:agpr_32 = COPY [[V_MOV_B]].sub0
; GCN-NEXT: $agpr0 = COPY [[COPY]]
; GCN-NEXT: S_ENDPGM 0
%0:vreg_64_align2 = V_MOV_B64_PSEUDO 4290672329592, implicit $exec
%1:agpr_32 = COPY %0.sub0
$agpr0 = COPY %1
S_ENDPGM 0

...

---
name: v_mov_b64_pseudo_lit_copy_sub1_to_agpr_32
tracksRegLiveness: true
body: |
bb.0:
; GCN-LABEL: name: v_mov_b64_pseudo_lit_copy_sub1_to_agpr_32
; GCN: [[V_MOV_B:%[0-9]+]]:vreg_64_align2 = V_MOV_B64_PSEUDO 4290672329592, implicit $exec
; GCN-NEXT: [[COPY:%[0-9]+]]:agpr_32 = COPY [[V_MOV_B]].sub1
; GCN-NEXT: $agpr0 = COPY [[COPY]]
; GCN-NEXT: S_ENDPGM 0
%0:vreg_64_align2 = V_MOV_B64_PSEUDO 4290672329592, implicit $exec
%1:agpr_32 = COPY %0.sub1
$agpr0 = COPY %1
S_ENDPGM 0

...


---
name: v_mov_b64_pseudo_imm_0_copy_to_av_64
tracksRegLiveness: true
body: |
bb.0:
; GCN-LABEL: name: v_mov_b64_pseudo_imm_0_copy_to_av_64
; GCN: [[V_MOV_B:%[0-9]+]]:vreg_64_align2 = V_MOV_B64_PSEUDO 0, implicit $exec
; GCN-NEXT: [[COPY:%[0-9]+]]:av_64_align2 = COPY [[V_MOV_B]]
; GCN-NEXT: S_ENDPGM 0, implicit [[COPY]]
%0:vreg_64_align2 = V_MOV_B64_PSEUDO 0, implicit $exec
%1:av_64_align2 = COPY %0
S_ENDPGM 0, implicit %1

...
Loading
Loading