246 lines
7.1 KiB
YAML
246 lines
7.1 KiB
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -mtriple=amdgcn -mcpu=gfx1150 -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck --check-prefixes=GFX1150 %s
|
|
# RUN: llc -mtriple=amdgcn -mcpu=gfx1150 -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck --check-prefixes=GFX1150 %s
|
|
|
|
---
|
|
name: fadd_f32
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $sgpr0, $sgpr1
|
|
|
|
; GFX1150-LABEL: name: fadd_f32
|
|
; GFX1150: liveins: $sgpr0, $sgpr1
|
|
; GFX1150-NEXT: {{ $}}
|
|
; GFX1150-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
|
|
; GFX1150-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
|
|
; GFX1150-NEXT: [[FADD:%[0-9]+]]:sgpr(s32) = G_FADD [[COPY]], [[COPY1]]
|
|
%0:_(s32) = COPY $sgpr0
|
|
%1:_(s32) = COPY $sgpr1
|
|
%2:_(s32) = G_FADD %0, %1
|
|
...
|
|
|
|
---
|
|
name: fptosi_f32_to_i32
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $sgpr0
|
|
|
|
; GFX1150-LABEL: name: fptosi_f32_to_i32
|
|
; GFX1150: liveins: $sgpr0
|
|
; GFX1150-NEXT: {{ $}}
|
|
; GFX1150-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
|
|
; GFX1150-NEXT: [[FPTOSI:%[0-9]+]]:sgpr(s32) = G_FPTOSI [[COPY]](s32)
|
|
%0:_(s32) = COPY $sgpr0
|
|
%1:_(s32) = G_FPTOSI %0(s32)
|
|
...
|
|
|
|
---
|
|
name: fptoui_f32_to_u32
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $sgpr0
|
|
|
|
; GFX1150-LABEL: name: fptoui_f32_to_u32
|
|
; GFX1150: liveins: $sgpr0
|
|
; GFX1150-NEXT: {{ $}}
|
|
; GFX1150-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
|
|
; GFX1150-NEXT: [[FPTOUI:%[0-9]+]]:sgpr(s32) = G_FPTOUI [[COPY]](s32)
|
|
%0:_(s32) = COPY $sgpr0
|
|
%1:_(s32) = G_FPTOUI %0(s32)
|
|
...
|
|
|
|
---
|
|
name: sitofp_i32_to_f32
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $sgpr0
|
|
|
|
; GFX1150-LABEL: name: sitofp_i32_to_f32
|
|
; GFX1150: liveins: $sgpr0
|
|
; GFX1150-NEXT: {{ $}}
|
|
; GFX1150-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
|
|
; GFX1150-NEXT: [[SITOFP:%[0-9]+]]:sgpr(s32) = G_SITOFP [[COPY]](s32)
|
|
%0:_(s32) = COPY $sgpr0
|
|
%1:_(s32) = G_SITOFP %0(s32)
|
|
...
|
|
|
|
---
|
|
name: uitofp_u32_to_f32
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $sgpr0
|
|
|
|
; GFX1150-LABEL: name: uitofp_u32_to_f32
|
|
; GFX1150: liveins: $sgpr0
|
|
; GFX1150-NEXT: {{ $}}
|
|
; GFX1150-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
|
|
; GFX1150-NEXT: [[UITOFP:%[0-9]+]]:sgpr(s32) = G_UITOFP [[COPY]](s32)
|
|
%0:_(s32) = COPY $sgpr0
|
|
%1:_(s32) = G_UITOFP %0(s32)
|
|
...
|
|
|
|
---
|
|
name: fptrunc_f32_to_f16
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $sgpr0
|
|
|
|
; GFX1150-LABEL: name: fptrunc_f32_to_f16
|
|
; GFX1150: liveins: $sgpr0
|
|
; GFX1150-NEXT: {{ $}}
|
|
; GFX1150-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
|
|
; GFX1150-NEXT: [[FPTRUNC:%[0-9]+]]:sgpr(s16) = G_FPTRUNC [[COPY]](s32)
|
|
%0:_(s32) = COPY $sgpr0
|
|
%1:_(s16) = G_FPTRUNC %0(s32)
|
|
...
|
|
|
|
---
|
|
name: fpext_f16_to_f32
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $sgpr0
|
|
|
|
; GFX1150-LABEL: name: fpext_f16_to_f32
|
|
; GFX1150: liveins: $sgpr0
|
|
; GFX1150-NEXT: {{ $}}
|
|
; GFX1150-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
|
|
; GFX1150-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
|
|
%1:_(s32) = COPY $sgpr0
|
|
%0:_(s16) = G_TRUNC %1(s32)
|
|
...
|
|
|
|
# Tests below should not select scalar registers
|
|
|
|
---
|
|
name: fadd_f64
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
|
|
|
|
; GFX1150-LABEL: name: fadd_f64
|
|
; GFX1150: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
|
|
; GFX1150-NEXT: {{ $}}
|
|
; GFX1150-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
|
|
; GFX1150-NEXT: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
|
|
; GFX1150-NEXT: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
|
|
; GFX1150-NEXT: [[COPY3:%[0-9]+]]:vgpr(s64) = COPY [[COPY1]](s64)
|
|
; GFX1150-NEXT: [[FADD:%[0-9]+]]:vgpr(s64) = G_FADD [[COPY2]], [[COPY3]]
|
|
%0:_(s64) = COPY $sgpr0_sgpr1
|
|
%1:_(s64) = COPY $sgpr2_sgpr3
|
|
%2:_(s64) = G_FADD %0, %1
|
|
...
|
|
|
|
---
|
|
name: fptosi_f64_to_i32
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $sgpr0, $sgpr1
|
|
|
|
; GFX1150-LABEL: name: fptosi_f64_to_i32
|
|
; GFX1150: liveins: $sgpr0, $sgpr1
|
|
; GFX1150-NEXT: {{ $}}
|
|
; GFX1150-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
|
|
; GFX1150-NEXT: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
|
|
; GFX1150-NEXT: [[FPTOSI:%[0-9]+]]:vgpr(s32) = G_FPTOSI [[COPY1]](s64)
|
|
%0:_(s64) = COPY $sgpr0_sgpr1
|
|
%1:_(s32) = G_FPTOSI %0(s64)
|
|
...
|
|
|
|
---
|
|
name: fptoui_f16_to_u16
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $sgpr0
|
|
|
|
; GFX1150-LABEL: name: fptoui_f16_to_u16
|
|
; GFX1150: liveins: $sgpr0
|
|
; GFX1150-NEXT: {{ $}}
|
|
; GFX1150-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
|
|
; GFX1150-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
|
|
; GFX1150-NEXT: [[COPY1:%[0-9]+]]:vgpr(s16) = COPY [[TRUNC]](s16)
|
|
; GFX1150-NEXT: [[FPTOUI:%[0-9]+]]:vgpr(s16) = G_FPTOUI [[COPY1]](s16)
|
|
%1:_(s32) = COPY $sgpr0
|
|
%0:_(s16) = G_TRUNC %1(s32)
|
|
%2:_(s16) = G_FPTOUI %0(s16)
|
|
...
|
|
|
|
---
|
|
name: sitofp_i32_to_f64
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $sgpr0
|
|
|
|
; GFX1150-LABEL: name: sitofp_i32_to_f64
|
|
; GFX1150: liveins: $sgpr0
|
|
; GFX1150-NEXT: {{ $}}
|
|
; GFX1150-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
|
|
; GFX1150-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
|
|
; GFX1150-NEXT: [[SITOFP:%[0-9]+]]:vgpr(s64) = G_SITOFP [[COPY1]](s32)
|
|
%0:_(s32) = COPY $sgpr0
|
|
%1:_(s64) = G_SITOFP %0(s32)
|
|
...
|
|
|
|
---
|
|
name: uitofp_u16_to_f16
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $sgpr0
|
|
|
|
; GFX1150-LABEL: name: uitofp_u16_to_f16
|
|
; GFX1150: liveins: $sgpr0
|
|
; GFX1150-NEXT: {{ $}}
|
|
; GFX1150-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
|
|
; GFX1150-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
|
|
; GFX1150-NEXT: [[COPY1:%[0-9]+]]:vgpr(s16) = COPY [[TRUNC]](s16)
|
|
; GFX1150-NEXT: [[UITOFP:%[0-9]+]]:vgpr(s16) = G_UITOFP [[COPY1]](s16)
|
|
%1:_(s32) = COPY $sgpr0
|
|
%0:_(s16) = G_TRUNC %1(s32)
|
|
%2:_(s16) = G_UITOFP %0(s16)
|
|
...
|
|
|
|
---
|
|
name: fptrunc_f64_to_f32
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $sgpr0_sgpr1
|
|
|
|
; GFX1150-LABEL: name: fptrunc_f64_to_f32
|
|
; GFX1150: liveins: $sgpr0_sgpr1
|
|
; GFX1150-NEXT: {{ $}}
|
|
; GFX1150-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
|
|
; GFX1150-NEXT: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
|
|
; GFX1150-NEXT: [[FPTRUNC:%[0-9]+]]:vgpr(s32) = G_FPTRUNC [[COPY1]](s64)
|
|
%0:_(s64) = COPY $sgpr0_sgpr1
|
|
%1:_(s32) = G_FPTRUNC %0(s64)
|
|
...
|
|
|
|
---
|
|
name: fpext_f32_to_f64
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $sgpr0
|
|
|
|
; GFX1150-LABEL: name: fpext_f32_to_f64
|
|
; GFX1150: liveins: $sgpr0
|
|
; GFX1150-NEXT: {{ $}}
|
|
; GFX1150-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
|
|
; GFX1150-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
|
|
; GFX1150-NEXT: [[FPEXT:%[0-9]+]]:vgpr(s64) = G_FPEXT [[COPY1]](s32)
|
|
%0:_(s32) = COPY $sgpr0
|
|
%1:_(s64) = G_FPEXT %0(s32)
|
|
|
|
...
|